summaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorSam Estep <sam@samestep.com>2025-07-23 21:34:21 -0400
committerGitHub <noreply@github.com>2025-07-24 01:34:21 +0000
commit9666fbcab891156fb058d6a1b8f427ccc3ffecab (patch)
tree626de80431a8ee43319f99e128f6144331b9f9a6 /flake.nix
parent559c8307d7537319c9f2b3f3d386d8b9b147aba3 (diff)
Document how to use LLDB in the Slang codebase (#7809)
* Document how to use LLDB in the Slang codebase * Include `slang_lldb.py` in `.lldbinit` * Switch from GCC to Clang * Include a VS Code task to build before debugging * Fix clangd
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index a6ad8f9f5..5b63b0e4c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,12 +16,20 @@
pkgs = import nixpkgs { inherit system; };
in
{
- devShell = pkgs.mkShell {
+ # We want to use Clang instead of GCC because it seems to behave better
+ # with LLDB, so we use `mkShellNoCC` here instead of `mkShell` because
+ # the latter brings in GCC by default on Linux.
+ devShell = pkgs.mkShellNoCC {
buildInputs = [
+ # Must put `clang-tools` before `clang` for clangd to work properly.
+ # We use `llvmPackages_17.clang-tools` instead of just `clang-tools`
+ # to match the `clang-format` version used in CI.
+ pkgs.llvmPackages_17.clang-tools
+
+ pkgs.clang
pkgs.cmake
pkgs.gersemi
- pkgs.llvm
- pkgs.llvmPackages_17.clang-tools
+ pkgs.lldb
pkgs.ninja
pkgs.nixfmt-rfc-style
pkgs.prettier