Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvmPackages_{12,13,14,15,16,17,18,git}: Simplify argument passthrough #307211

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

pwaller
Copy link
Contributor

@pwaller pwaller commented Apr 27, 2024

Description of changes

This patch is not intended to introduce any functional change. drvPaths
should remain unchanged; if they do change, it's a bug (note: this revealed
a bug in the derivation's source paths for LLVM 13 which I've preserved
to avoid a rebuild).

Prior to this patch, a set of packages gets passed through from the
llvmPackages top level function to the individual packages via
callPackages, which is a newScope constructed with some specific
arguments.

As it stands this makes it harder to override dependencies of LLVM; for
example take ncurses. If you want to override it, it is an argument to
libllvm, however, if you override libllvm you then have to write a lot
of code to have correctly overridden clang.

Instead, I propose to make sure that all the dependencies of all
llvmPackages are listed as an inputs to the top level llvmPackages,
and then the resulting newScope will contain all of them. This in
turn will make llvmPackages.override work as expected for any
input to each of the llvm packages.

We'll achieve this by simplifying the code a bit and ensuring that all
arguments to llvmPackage get forwarded to all packages (via {}@args).

This represents a chance to simplify things a bit so I propose doing it
in two steps:

  1. This patch: Simplify argument pass through.
  2. (Later): Ensure all arguments to each llvm package are listed in the
    top level llvm/X/default.nix.

Once 2 lands, this means that (llvmPackages.override { ncurses = myncurses; }).clang would consist of a clang whose libllvm had the
ncurses overridden. This is not the case prior to this patch.

For v1 draft of this patch I have only fixed llvmPackages 18 to keep the
first pass review simple. If others agree this is a good way forward, I
will fix up all the other llvmPackages revision.

(No longer draft after getting some preliminary private approval from a maintainer)

Signed-off-by: Peter Waller [email protected]

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Apr 27, 2024
@pwaller pwaller force-pushed the llvm-simplify-arg-passthrough branch from 7d2f737 to 7819777 Compare April 27, 2024 21:34
@pwaller
Copy link
Contributor Author

pwaller commented Apr 27, 2024

This refactor found a bug in LLVM 13, that monorepoSrc wasn't being consistently passed through. (Search for the term 'bug' in the patch). I preserved the bug during this refactor since we're in/approaching a stablisation phase I don't want to cause any rebuilds.

In order to test this I generated the complete set of drvPaths for all attributes of llvmPackages_* which have a drvPath. I diff'd the output before and after and confirmed they are the unchanged.

 genDrvPaths = nixpkgs: let
    allLLVMPackagesNames = lib.filter (lib.hasPrefix "llvmPackages") (builtins.attrNames nixpkgs);
    allLLVMPackages' = lib.genAttrs allLLVMPackagesNames (e:
      (builtins.tryEval (builtins.attrNames (nixpkgs.${e})))
    );
    mkAttrs = pkgSet: pkg:
      builtins.tryEval (nixpkgs.${pkgSet}.${pkg}.drvPath or null);
    genSet = k: v: lib.filterAttrs (k: v: v != null)
      (mapValue (removeFailed (lib.genAttrs v.value (mkAttrs k))));
    filterSet = k: v:  v.success != false;
    mapValue = lib.mapAttrs (k: v: v.value);
    removeFailed = attrs: lib.filterAttrs filterSet attrs;
    allLLVMPackages = lib.mapAttrs genSet (removeFailed allLLVMPackages');
  in allLLVMPackages;
Click to expand resulting attrset for `nixpkgs.llvmPkgs` @ 8753c7c (unchanged by this patch)
{
  "llvmPackages": {
    "bintools": "/nix/store/qpxd5x8v7flbmnk8i89gys6gb6bxxw3p-llvm-binutils-wrapper-17.0.6.drv",
    "bintools-unwrapped": "/nix/store/l86fff20zw7kqqqhrdsxln9bjyvs2brn-llvm-binutils-17.0.6.drv",
    "bintoolsNoLibc": "/nix/store/qsqp7z6icyrqh961lnl14aw9qdk1dcsv-llvm-binutils-wrapper-17.0.6.drv",
    "clang": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "clang-manpages": "/nix/store/wirbw926f3b9pqm6rziv1qpk0jinl3c2-clang-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clang-unwrapped": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clangNoCompilerRt": "/nix/store/9q317pqnrg8yqg0gza672jx1qcffryjn-clang-wrapper-17.0.6.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/dk91nb1chiijsrrv6k34363rr4k744pm-clang-wrapper-17.0.6.drv",
    "clangNoLibc": "/nix/store/ngagpmvvsdxqhmkwbmg8kizi4l47dzh0-clang-wrapper-17.0.6.drv",
    "clangNoLibcxx": "/nix/store/2rn7874qznk7ph6xc3ampw0k20fi5ydf-clang-wrapper-17.0.6.drv",
    "clangUseLLVM": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "compiler-rt": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-libc": "/nix/store/5kmbakpzyd1ql453kygg52xlmg192m1s-compiler-rt-libc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-no-libc": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclang": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclc": "/nix/store/gdxb2790x9rdyrr4l12s4m27frh18fkp-libclc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxx": "/nix/store/z5gq8lai70wdq941fbgxiz52ivnnr1rh-libcxx-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxxClang": "/nix/store/z1h8nnkf8q6kk6i2sar4mfjk66a3ay42-clang-wrapper-17.0.6.drv",
    "libcxxStdenv": "/nix/store/qmbvhgr68flaq0cqwn72z68x84f4k88a-stdenv-linux.drv",
    "libllvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libstdcxxClang": "/nix/store/yq61pr3xszsjw2g452q1l2rcrmvbsp4w-clang-wrapper-17.0.6.drv",
    "libunwind": "/nix/store/z2bnkib7n3m2hvcmcl7xml1fdsfc8djb-libunwind-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lld": "/nix/store/afr1k5ifhaglp948qyz49qymh0g4y54l-lld-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb": "/nix/store/8c7vg25an12w5zcv3icyfm98wi2dxy95-lldb-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb-manpages": "/nix/store/5fsxvvfpy9lj6w95mn1ab4f6fhn81627-lldb-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm-manpages": "/nix/store/fyxwyh1p9m7sj8dibg2bxdr1y1kk09xm-llvm-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "mlir": "/nix/store/lz12b4p6wnnsj5nmbr0zlh4a5l9dsck6-mlir-x86_64-unknown-linux-gnu-17.0.6.drv",
    "openmp": "/nix/store/0chn6xlmx41bhfl9dszpx1sydr3w9v87-openmp-x86_64-unknown-linux-gnu-17.0.6.drv",
    "stdenv": "/nix/store/b2qy0ijsri9lci4snl9m5zvp8a7zal6i-stdenv-linux.drv"
  },
  "llvmPackages_12": {
    "bintools": "/nix/store/m77acv0gq0ivp3f9pnfbwjkf2hqmqszz-llvm-binutils-wrapper-12.0.1.drv",
    "bintools-unwrapped": "/nix/store/dnyakmjvfyy2ip7k13nlis21l3x8w75n-llvm-binutils-12.0.1.drv",
    "bintoolsNoLibc": "/nix/store/f95rgvyjsmljq4fwl3i0xm29j8dawqj6-llvm-binutils-wrapper-12.0.1.drv",
    "clang": "/nix/store/ig3zn9crzcrbajdb8ymyy4xwwcac5632-clang-wrapper-12.0.1.drv",
    "clang-manpages": "/nix/store/6xp0sskqhdfcfbi9lywg23g6087dwyq5-clang-manpages-x86_64-unknown-linux-gnu-12.0.1.drv",
    "clang-unwrapped": "/nix/store/sn6qkgx73szmgmnfhwib7651i8wh8bin-clang-x86_64-unknown-linux-gnu-12.0.1.drv",
    "clangNoCompilerRt": "/nix/store/1s9mxx3r4rdpf22f474ng6yvggbpam9x-clang-wrapper-12.0.1.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/lmnf8zhc8msfjzc9ybqv34aj8kdsyg8k-clang-wrapper-12.0.1.drv",
    "clangNoLibc": "/nix/store/4agpayxbrcmnjj0v72ylxm11wsvi8d6w-clang-wrapper-12.0.1.drv",
    "clangNoLibcxx": "/nix/store/al7691s4pqr93r9wir42y9ylqg9bkp3i-clang-wrapper-12.0.1.drv",
    "clangUseLLVM": "/nix/store/ig3zn9crzcrbajdb8ymyy4xwwcac5632-clang-wrapper-12.0.1.drv",
    "compiler-rt": "/nix/store/fcka7p9nhqpg02imdimfa90c7syk4gxq-compiler-rt-x86_64-unknown-linux-gnu-12.0.1.drv",
    "compiler-rt-libc": "/nix/store/xsccig0v3ynbjcq5344bhsf36krvk9ka-compiler-rt-libc-x86_64-unknown-linux-gnu-12.0.1.drv",
    "compiler-rt-no-libc": "/nix/store/fcka7p9nhqpg02imdimfa90c7syk4gxq-compiler-rt-x86_64-unknown-linux-gnu-12.0.1.drv",
    "libclang": "/nix/store/sn6qkgx73szmgmnfhwib7651i8wh8bin-clang-x86_64-unknown-linux-gnu-12.0.1.drv",
    "libcxx": "/nix/store/ry59nwybfis4v451r2svs62bmhhs927b-libcxx-x86_64-unknown-linux-gnu-12.0.1.drv",
    "libcxxClang": "/nix/store/k1p1qxbji2lf6sm1w5l4nf6p7fkcz5xk-clang-wrapper-12.0.1.drv",
    "libcxxStdenv": "/nix/store/sgnhqgchjvgqzwqbqvhdq828ljnapvmm-stdenv-linux.drv",
    "libllvm": "/nix/store/sh8vpzrcqg1xzbp9jha2aysl36k29405-llvm-x86_64-unknown-linux-gnu-12.0.1.drv",
    "libstdcxxClang": "/nix/store/778j9w58m5h3yf5vbrzprvznycl6zzbh-clang-wrapper-12.0.1.drv",
    "libunwind": "/nix/store/vy85za3zjlds3pr3sdkpj90w4lhak5c7-libunwind-x86_64-unknown-linux-gnu-12.0.1.drv",
    "lld": "/nix/store/75a0h51wiaa9qz92v3fqhza0c66mz7sw-lld-x86_64-unknown-linux-gnu-12.0.1.drv",
    "lldb": "/nix/store/6sspyfqkyh2wf5pgydawikwam0y4mp78-lldb-x86_64-unknown-linux-gnu-12.0.1.drv",
    "llvm": "/nix/store/sh8vpzrcqg1xzbp9jha2aysl36k29405-llvm-x86_64-unknown-linux-gnu-12.0.1.drv",
    "openmp": "/nix/store/ns6pk2gnrl5fcgxw7h3aiz6zgpyl5w1d-openmp-x86_64-unknown-linux-gnu-12.0.1.drv",
    "stdenv": "/nix/store/8lq9q2pzj90b6jwvs6l8381md9pf3720-stdenv-linux.drv"
  },
  "llvmPackages_13": {
    "bintools": "/nix/store/1q67pinlvfszlf2hpjd6kknd2zwasyis-llvm-binutils-wrapper-13.0.1.drv",
    "bintools-unwrapped": "/nix/store/jsydrmd3kj83gyxh7fknvaas1g8qq4sx-llvm-binutils-13.0.1.drv",
    "bintoolsNoLibc": "/nix/store/wdbq43rhg5vpjb6fx2nky1kff24vskxy-llvm-binutils-wrapper-13.0.1.drv",
    "clang": "/nix/store/a5s7nbjbr7r35k1q6fmqai7637vqj21d-clang-wrapper-13.0.1.drv",
    "clang-manpages": "/nix/store/0lfap36b75fcwvd16idna5q80im6dq6y-clang-manpages-x86_64-unknown-linux-gnu-13.0.1.drv",
    "clang-unwrapped": "/nix/store/klrfp2ymn3l2hkfvb7wx37hsljzzxkvm-clang-x86_64-unknown-linux-gnu-13.0.1.drv",
    "clangNoCompilerRt": "/nix/store/fm2yih19fahdskzbm7w8k7gjww2frkza-clang-wrapper-13.0.1.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/najfijmd8dw42d0mn2mibclzl5arwvki-clang-wrapper-13.0.1.drv",
    "clangNoLibc": "/nix/store/bdhs9qmh29q4jk7vqmh400lc4m3fzlw3-clang-wrapper-13.0.1.drv",
    "clangNoLibcxx": "/nix/store/zp85wd6bimaai86fkh57zdxq6cwl3fwp-clang-wrapper-13.0.1.drv",
    "clangUseLLVM": "/nix/store/a5s7nbjbr7r35k1q6fmqai7637vqj21d-clang-wrapper-13.0.1.drv",
    "compiler-rt": "/nix/store/wyacqibs3qjrjsp2xyidn1vz151rnlhr-compiler-rt-x86_64-unknown-linux-gnu-13.0.1.drv",
    "compiler-rt-libc": "/nix/store/qfqwr9dw9566gzcj184m9ilnnimmlw02-compiler-rt-libc-x86_64-unknown-linux-gnu-13.0.1.drv",
    "compiler-rt-no-libc": "/nix/store/wyacqibs3qjrjsp2xyidn1vz151rnlhr-compiler-rt-x86_64-unknown-linux-gnu-13.0.1.drv",
    "libclang": "/nix/store/klrfp2ymn3l2hkfvb7wx37hsljzzxkvm-clang-x86_64-unknown-linux-gnu-13.0.1.drv",
    "libcxx": "/nix/store/npg8238xd9y6h1pn2xiw4qan8c4hxhim-libcxx-x86_64-unknown-linux-gnu-13.0.1.drv",
    "libcxxClang": "/nix/store/gg5463pbqjbg0cnma831kdc21f0s8k2k-clang-wrapper-13.0.1.drv",
    "libcxxStdenv": "/nix/store/27izfqaq3bihgidcjmpsvk6niydjk1nx-stdenv-linux.drv",
    "libllvm": "/nix/store/8cwpjv8kn2v9gh69cz3fa21p28k8352g-llvm-x86_64-unknown-linux-gnu-13.0.1.drv",
    "libstdcxxClang": "/nix/store/vzj5ra3sap8vsqvrvx1z0cb22a21h81p-clang-wrapper-13.0.1.drv",
    "libunwind": "/nix/store/c2yrmac337li133kql5hclph0fjd2546-libunwind-x86_64-unknown-linux-gnu-13.0.1.drv",
    "lld": "/nix/store/am79m13fawjg4ladbrps2yicaxrnisrq-lld-x86_64-unknown-linux-gnu-13.0.1.drv",
    "lldb": "/nix/store/gxfnp00r7j5fqj2pnx90796zyn3pbhw8-lldb-x86_64-unknown-linux-gnu-13.0.1.drv",
    "llvm": "/nix/store/8cwpjv8kn2v9gh69cz3fa21p28k8352g-llvm-x86_64-unknown-linux-gnu-13.0.1.drv",
    "llvm-manpages": "/nix/store/7pafnyn7jp8c4iyx4cpc0ynq5wixvn8q-llvm-manpages-x86_64-unknown-linux-gnu-13.0.1.drv",
    "openmp": "/nix/store/1425xqvafmifq3r2gdii97a6jbdi0ypb-openmp-x86_64-unknown-linux-gnu-13.0.1.drv",
    "stdenv": "/nix/store/3n4dwxyqyk5njjcy537h61av7npig921-stdenv-linux.drv"
  },
  "llvmPackages_14": {
    "bintools": "/nix/store/vl3zarmvlcam1q8y6hgincykv5bmrjim-llvm-binutils-wrapper-14.0.6.drv",
    "bintools-unwrapped": "/nix/store/68q5a9mjc97gh715qh54y26z2fm23xgj-llvm-binutils-14.0.6.drv",
    "bintoolsNoLibc": "/nix/store/j64xjnhl0hq56xiigcll52vwjhlxwq7m-llvm-binutils-wrapper-14.0.6.drv",
    "clang": "/nix/store/gdnacfc991i7igygk324nvallqn9nqp5-clang-wrapper-14.0.6.drv",
    "clang-manpages": "/nix/store/x7zschscqh4bgm5076rls7qngsbx26z9-clang-manpages-x86_64-unknown-linux-gnu-14.0.6.drv",
    "clang-unwrapped": "/nix/store/w34wp7y5x0rlaijd9kli8x86ax0wmdjy-clang-x86_64-unknown-linux-gnu-14.0.6.drv",
    "clangNoCompilerRt": "/nix/store/hn92wra167k2xnzpgmahylpvfdi0x21m-clang-wrapper-14.0.6.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/gn7yxgv5snz6ndr0qnyrp5wawj7w6hvq-clang-wrapper-14.0.6.drv",
    "clangNoLibc": "/nix/store/c4cz7bhdsm7h9i0mxpryv8kk80iqkl83-clang-wrapper-14.0.6.drv",
    "clangNoLibcxx": "/nix/store/rsx4j5q490gmi9rdqf302594ipqy257s-clang-wrapper-14.0.6.drv",
    "clangUseLLVM": "/nix/store/gdnacfc991i7igygk324nvallqn9nqp5-clang-wrapper-14.0.6.drv",
    "compiler-rt": "/nix/store/w9klvm5mv27nwhv4h5b750xrz6gqvdp9-compiler-rt-x86_64-unknown-linux-gnu-14.0.6.drv",
    "compiler-rt-libc": "/nix/store/v9530xqi4bd4jwhgirj92k1ccvrky01k-compiler-rt-libc-x86_64-unknown-linux-gnu-14.0.6.drv",
    "compiler-rt-no-libc": "/nix/store/w9klvm5mv27nwhv4h5b750xrz6gqvdp9-compiler-rt-x86_64-unknown-linux-gnu-14.0.6.drv",
    "libclang": "/nix/store/w34wp7y5x0rlaijd9kli8x86ax0wmdjy-clang-x86_64-unknown-linux-gnu-14.0.6.drv",
    "libcxx": "/nix/store/gjg92b88iqj933lnf3s28hd2g58gywkn-libcxx-x86_64-unknown-linux-gnu-14.0.6.drv",
    "libcxxClang": "/nix/store/fzvcgs9mccg7zq2g26isa61sybr4ihc0-clang-wrapper-14.0.6.drv",
    "libcxxStdenv": "/nix/store/sqqyz2h2yzihc05xik3xq1ari1j4rmn8-stdenv-linux.drv",
    "libllvm": "/nix/store/cz0jv4447mqqqmh20basb95fwy27qyj5-llvm-x86_64-unknown-linux-gnu-14.0.6.drv",
    "libstdcxxClang": "/nix/store/90sx44wlvz792a1zhbmqvjs6rwy3gffl-clang-wrapper-14.0.6.drv",
    "libunwind": "/nix/store/2j80dn476mfd15bp3lrlri41p9s0l3z2-libunwind-x86_64-unknown-linux-gnu-14.0.6.drv",
    "lld": "/nix/store/5wh015ayw5b79y96b8jlq16ancvfnlli-lld-x86_64-unknown-linux-gnu-14.0.6.drv",
    "lldb": "/nix/store/4jbcs683dn8a00p2lk1z66bgslakvy8j-lldb-x86_64-unknown-linux-gnu-14.0.6.drv",
    "llvm": "/nix/store/cz0jv4447mqqqmh20basb95fwy27qyj5-llvm-x86_64-unknown-linux-gnu-14.0.6.drv",
    "llvm-manpages": "/nix/store/pc8snq4ldsx5afi3bffm970r01myb5px-llvm-manpages-x86_64-unknown-linux-gnu-14.0.6.drv",
    "openmp": "/nix/store/wnj9iky274ilks0llzmbrrkl2d6rabyz-openmp-x86_64-unknown-linux-gnu-14.0.6.drv",
    "stdenv": "/nix/store/w7gm0pcacksj9ai3k957d75d4siaavz7-stdenv-linux.drv"
  },
  "llvmPackages_15": {
    "bintools": "/nix/store/2vz301y0g2bs6an9ix9kfcbyg36avmkx-llvm-binutils-wrapper-15.0.7.drv",
    "bintools-unwrapped": "/nix/store/wbzmfidvfla9hak7wxcr1si9prrcar1r-llvm-binutils-15.0.7.drv",
    "bintoolsNoLibc": "/nix/store/x2ya831wcpvjhy6jpmlfb5ykxkm7sd01-llvm-binutils-wrapper-15.0.7.drv",
    "clang": "/nix/store/gf40d2w3a7i0mki2x1fa249mvd7da5ir-clang-wrapper-15.0.7.drv",
    "clang-manpages": "/nix/store/ql9q691is2yz8xs8wf18xy7pp872szqy-clang-manpages-x86_64-unknown-linux-gnu-15.0.7.drv",
    "clang-unwrapped": "/nix/store/1jfcwlfz7kjhay2jq48gswa865w325vl-clang-x86_64-unknown-linux-gnu-15.0.7.drv",
    "clangNoCompilerRt": "/nix/store/78iyqbafy1zwg0v2cvkrgqak2zjjnwr3-clang-wrapper-15.0.7.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/xmr1adg8x8jlw42h6pb1g758i17pf13x-clang-wrapper-15.0.7.drv",
    "clangNoLibc": "/nix/store/ca2nl6c848krphgp56rlr8s9a84kl1sz-clang-wrapper-15.0.7.drv",
    "clangNoLibcxx": "/nix/store/zzdhhcdrc77ah3xjd7pynw4cz6i5js27-clang-wrapper-15.0.7.drv",
    "clangUseLLVM": "/nix/store/gf40d2w3a7i0mki2x1fa249mvd7da5ir-clang-wrapper-15.0.7.drv",
    "compiler-rt": "/nix/store/d3zk1qf48kqisi7ajxv1p8gyvggwr711-compiler-rt-x86_64-unknown-linux-gnu-15.0.7.drv",
    "compiler-rt-libc": "/nix/store/wxiyl4hhairrvl054vr24j01sfnmydja-compiler-rt-libc-x86_64-unknown-linux-gnu-15.0.7.drv",
    "compiler-rt-no-libc": "/nix/store/d3zk1qf48kqisi7ajxv1p8gyvggwr711-compiler-rt-x86_64-unknown-linux-gnu-15.0.7.drv",
    "libclang": "/nix/store/1jfcwlfz7kjhay2jq48gswa865w325vl-clang-x86_64-unknown-linux-gnu-15.0.7.drv",
    "libcxx": "/nix/store/dcxgz0q0d81dpvrx2cijymw98q9sgwsa-libcxx-x86_64-unknown-linux-gnu-15.0.7.drv",
    "libcxxClang": "/nix/store/8mv0idmmpyinylsj94jpcdqn8pdz7bsl-clang-wrapper-15.0.7.drv",
    "libcxxStdenv": "/nix/store/zn2d7767glga192qgcsjv08a9f68fnhj-stdenv-linux.drv",
    "libllvm": "/nix/store/djj9n1w677r35k967bn4kgw9bmnmgsa6-llvm-x86_64-unknown-linux-gnu-15.0.7.drv",
    "libstdcxxClang": "/nix/store/j0h1g7whycfdiig85y531aax7wldgr7r-clang-wrapper-15.0.7.drv",
    "libunwind": "/nix/store/y9c39wz2a9xpl58sgpxbis01asc5bi53-libunwind-x86_64-unknown-linux-gnu-15.0.7.drv",
    "lld": "/nix/store/4gr59lijb8yg426b3bd8fhqgxdx9yj81-lld-x86_64-unknown-linux-gnu-15.0.7.drv",
    "lldb": "/nix/store/hc5iw9b4w76nqv50bjy5indvkyj70y38-lldb-x86_64-unknown-linux-gnu-15.0.7.drv",
    "lldb-manpages": "/nix/store/kmv21c8fwwiv5id6fsyybxh1382lj0xj-lldb-manpages-x86_64-unknown-linux-gnu-15.0.7.drv",
    "llvm": "/nix/store/djj9n1w677r35k967bn4kgw9bmnmgsa6-llvm-x86_64-unknown-linux-gnu-15.0.7.drv",
    "llvm-manpages": "/nix/store/wdb1zrp4zvlycxfvbiifbhcwiyl9sjil-llvm-manpages-x86_64-unknown-linux-gnu-15.0.7.drv",
    "openmp": "/nix/store/dw28f24sa8ky5xgj9749rplrvyl2jabw-openmp-x86_64-unknown-linux-gnu-15.0.7.drv",
    "stdenv": "/nix/store/mhkzrs0sp3ncm5iwv6m09fqqp0hy0jnk-stdenv-linux.drv"
  },
  "llvmPackages_16": {
    "bintools": "/nix/store/876i38axdrvsi8afv3ccv4vp1iznzd02-llvm-binutils-wrapper-16.0.6.drv",
    "bintools-unwrapped": "/nix/store/8q8kmfjfr13qzs0dzp886knd94vhh3p0-llvm-binutils-16.0.6.drv",
    "bintoolsNoLibc": "/nix/store/2pwim8kpjrwjwb8q751vip58dcjjkzch-llvm-binutils-wrapper-16.0.6.drv",
    "clang": "/nix/store/gbd3crb2ravhwx9p6zphbpadwdnmkqm9-clang-wrapper-16.0.6.drv",
    "clang-manpages": "/nix/store/57dc98gwahsik8ggwvi1r879wxnn8hx8-clang-manpages-x86_64-unknown-linux-gnu-16.0.6.drv",
    "clang-unwrapped": "/nix/store/p8106avj3s3bq4swk6zasz5aq9snz5ii-clang-x86_64-unknown-linux-gnu-16.0.6.drv",
    "clangNoCompilerRt": "/nix/store/pfg5hkwzhpy7d4l7i4s92c0d4a0n9p8z-clang-wrapper-16.0.6.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/q6b1iwqj19nfl5zasz5n14acp2x7sd9s-clang-wrapper-16.0.6.drv",
    "clangNoLibc": "/nix/store/raci8rv7bv6w1140v0wl6yhwvi43fr7r-clang-wrapper-16.0.6.drv",
    "clangNoLibcxx": "/nix/store/c1ixcm45r9crbmpf6mdscx8qpfp1arag-clang-wrapper-16.0.6.drv",
    "clangUseLLVM": "/nix/store/gbd3crb2ravhwx9p6zphbpadwdnmkqm9-clang-wrapper-16.0.6.drv",
    "compiler-rt": "/nix/store/9l1dw7dacds5g00dcni39fisdmjk2fr0-compiler-rt-x86_64-unknown-linux-gnu-16.0.6.drv",
    "compiler-rt-libc": "/nix/store/f3894kn13z0fd6m6vvlx7cb0d1hwmci0-compiler-rt-libc-x86_64-unknown-linux-gnu-16.0.6.drv",
    "compiler-rt-no-libc": "/nix/store/9l1dw7dacds5g00dcni39fisdmjk2fr0-compiler-rt-x86_64-unknown-linux-gnu-16.0.6.drv",
    "libclang": "/nix/store/p8106avj3s3bq4swk6zasz5aq9snz5ii-clang-x86_64-unknown-linux-gnu-16.0.6.drv",
    "libclc": "/nix/store/c8gkx42lgg080m5arcn2gwdybicvrw3s-libclc-x86_64-unknown-linux-gnu-16.0.6.drv",
    "libcxx": "/nix/store/0grim9n0gk0khvhb7ys5n1x65gcnbxbx-libcxx-x86_64-unknown-linux-gnu-16.0.6.drv",
    "libcxxClang": "/nix/store/q04yg9n5l1v8wxbgs6kzi367p343dbna-clang-wrapper-16.0.6.drv",
    "libcxxStdenv": "/nix/store/r8i4k64jg42hvnn6fkpixdp07llz8izx-stdenv-linux.drv",
    "libllvm": "/nix/store/hlj9fmfly5cs9b02f4h2b4bpmxjc4j14-llvm-x86_64-unknown-linux-gnu-16.0.6.drv",
    "libstdcxxClang": "/nix/store/0dhlsv0hh0szskmx72yk3nrmf4jdw74g-clang-wrapper-16.0.6.drv",
    "libunwind": "/nix/store/gf5s1kxqag3gp5q2jmg4r7xnbnwa6y93-libunwind-x86_64-unknown-linux-gnu-16.0.6.drv",
    "lld": "/nix/store/fczs8dri4xpyxxfwmlgj3k36wbhvnn7k-lld-x86_64-unknown-linux-gnu-16.0.6.drv",
    "lldb": "/nix/store/00lvydrakvxabfx6hkw6dmkmlkd7681z-lldb-x86_64-unknown-linux-gnu-16.0.6.drv",
    "lldb-manpages": "/nix/store/g3yl7jy1z3zlc9lng2zcdb671qidik00-lldb-manpages-x86_64-unknown-linux-gnu-16.0.6.drv",
    "llvm": "/nix/store/hlj9fmfly5cs9b02f4h2b4bpmxjc4j14-llvm-x86_64-unknown-linux-gnu-16.0.6.drv",
    "llvm-manpages": "/nix/store/fq6112zdxs30vwfviaak4a072vx69qqn-llvm-manpages-x86_64-unknown-linux-gnu-16.0.6.drv",
    "mlir": "/nix/store/p6ihd62psid2zgkrg9g7w41g3wkflah3-mlir-x86_64-unknown-linux-gnu-16.0.6.drv",
    "openmp": "/nix/store/p4f39w7g88x7zjl8g0pyqf75mrcn2z05-openmp-x86_64-unknown-linux-gnu-16.0.6.drv",
    "stdenv": "/nix/store/h35sk1qx37prff5jpd7fgh665kma8al7-stdenv-linux.drv"
  },
  "llvmPackages_17": {
    "bintools": "/nix/store/qpxd5x8v7flbmnk8i89gys6gb6bxxw3p-llvm-binutils-wrapper-17.0.6.drv",
    "bintools-unwrapped": "/nix/store/l86fff20zw7kqqqhrdsxln9bjyvs2brn-llvm-binutils-17.0.6.drv",
    "bintoolsNoLibc": "/nix/store/qsqp7z6icyrqh961lnl14aw9qdk1dcsv-llvm-binutils-wrapper-17.0.6.drv",
    "clang": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "clang-manpages": "/nix/store/wirbw926f3b9pqm6rziv1qpk0jinl3c2-clang-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clang-unwrapped": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clangNoCompilerRt": "/nix/store/9q317pqnrg8yqg0gza672jx1qcffryjn-clang-wrapper-17.0.6.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/dk91nb1chiijsrrv6k34363rr4k744pm-clang-wrapper-17.0.6.drv",
    "clangNoLibc": "/nix/store/ngagpmvvsdxqhmkwbmg8kizi4l47dzh0-clang-wrapper-17.0.6.drv",
    "clangNoLibcxx": "/nix/store/2rn7874qznk7ph6xc3ampw0k20fi5ydf-clang-wrapper-17.0.6.drv",
    "clangUseLLVM": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "compiler-rt": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-libc": "/nix/store/5kmbakpzyd1ql453kygg52xlmg192m1s-compiler-rt-libc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-no-libc": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclang": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclc": "/nix/store/gdxb2790x9rdyrr4l12s4m27frh18fkp-libclc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxx": "/nix/store/z5gq8lai70wdq941fbgxiz52ivnnr1rh-libcxx-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxxClang": "/nix/store/z1h8nnkf8q6kk6i2sar4mfjk66a3ay42-clang-wrapper-17.0.6.drv",
    "libcxxStdenv": "/nix/store/qmbvhgr68flaq0cqwn72z68x84f4k88a-stdenv-linux.drv",
    "libllvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libstdcxxClang": "/nix/store/yq61pr3xszsjw2g452q1l2rcrmvbsp4w-clang-wrapper-17.0.6.drv",
    "libunwind": "/nix/store/z2bnkib7n3m2hvcmcl7xml1fdsfc8djb-libunwind-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lld": "/nix/store/afr1k5ifhaglp948qyz49qymh0g4y54l-lld-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb": "/nix/store/8c7vg25an12w5zcv3icyfm98wi2dxy95-lldb-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb-manpages": "/nix/store/5fsxvvfpy9lj6w95mn1ab4f6fhn81627-lldb-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm-manpages": "/nix/store/fyxwyh1p9m7sj8dibg2bxdr1y1kk09xm-llvm-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "mlir": "/nix/store/lz12b4p6wnnsj5nmbr0zlh4a5l9dsck6-mlir-x86_64-unknown-linux-gnu-17.0.6.drv",
    "openmp": "/nix/store/0chn6xlmx41bhfl9dszpx1sydr3w9v87-openmp-x86_64-unknown-linux-gnu-17.0.6.drv",
    "stdenv": "/nix/store/b2qy0ijsri9lci4snl9m5zvp8a7zal6i-stdenv-linux.drv"
  },
  "llvmPackages_18": {
    "bintools": "/nix/store/x63zxvkp730n3d2fvgpvp148a0i0r3yg-llvm-binutils-wrapper-18.1.3.drv",
    "bintools-unwrapped": "/nix/store/qzpgbqd9safns762ygfbg7kvp8dfqca9-llvm-binutils-18.1.3.drv",
    "bintoolsNoLibc": "/nix/store/wxsm58q0x94bf3gmipx6h62vha3xvj8j-llvm-binutils-wrapper-18.1.3.drv",
    "clang": "/nix/store/7lxgywk70dga94wqpwc4zpga0k96cp70-clang-wrapper-18.1.3.drv",
    "clang-manpages": "/nix/store/mfm6k2iab27wj1b1ip2j616jmjfkvz3v-clang-manpages-x86_64-unknown-linux-gnu-18.1.3.drv",
    "clang-unwrapped": "/nix/store/w3cbs4pl53dpaphsfxpp1cck5b8zi7c9-clang-x86_64-unknown-linux-gnu-18.1.3.drv",
    "clangNoCompilerRt": "/nix/store/4hq3gmbf9kbm0ybmsl6smk04spi1zhql-clang-wrapper-18.1.3.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/5hindrzbrn41d0zv0sbzqkpbphrhmxi3-clang-wrapper-18.1.3.drv",
    "clangNoLibc": "/nix/store/2x2b0g7gczqpqbc97m8af82k5y3agn7j-clang-wrapper-18.1.3.drv",
    "clangNoLibcxx": "/nix/store/3gff8k12w03ja225jipwcd5fqaglqcl1-clang-wrapper-18.1.3.drv",
    "clangUseLLVM": "/nix/store/7lxgywk70dga94wqpwc4zpga0k96cp70-clang-wrapper-18.1.3.drv",
    "compiler-rt": "/nix/store/65gkpqq7d3qq2hcxapqk0hv4rm2l47pz-compiler-rt-x86_64-unknown-linux-gnu-18.1.3.drv",
    "compiler-rt-libc": "/nix/store/sgim32ivqpn1diri1awy4z836l2l8lf9-compiler-rt-libc-x86_64-unknown-linux-gnu-18.1.3.drv",
    "compiler-rt-no-libc": "/nix/store/65gkpqq7d3qq2hcxapqk0hv4rm2l47pz-compiler-rt-x86_64-unknown-linux-gnu-18.1.3.drv",
    "libclang": "/nix/store/w3cbs4pl53dpaphsfxpp1cck5b8zi7c9-clang-x86_64-unknown-linux-gnu-18.1.3.drv",
    "libclc": "/nix/store/k3bqny9y6h2zpwijk4bqv9kiisi9vsbb-libclc-x86_64-unknown-linux-gnu-18.1.3.drv",
    "libcxx": "/nix/store/5alc6f6cirkpnqnaw9dhhh83p7bzn04i-libcxx-x86_64-unknown-linux-gnu-18.1.3.drv",
    "libcxxClang": "/nix/store/ky9ify101fynpxiggwiizv42aa0zgwpm-clang-wrapper-18.1.3.drv",
    "libcxxStdenv": "/nix/store/skknk3869mqv878rf2hdxfbg53qd7bba-stdenv-linux.drv",
    "libllvm": "/nix/store/780h4j3qrp0cg8l0ziz5plxwbc739pj6-llvm-x86_64-unknown-linux-gnu-18.1.3.drv",
    "libstdcxxClang": "/nix/store/4vrvqhn5wds3376r8n862l21v16a6id1-clang-wrapper-18.1.3.drv",
    "libunwind": "/nix/store/gmlh5za4n4frlh595axlprkn7jpsjnv7-libunwind-x86_64-unknown-linux-gnu-18.1.3.drv",
    "lld": "/nix/store/1dk3qgbndhyzkmw1ik04ki79k5hvchbs-lld-x86_64-unknown-linux-gnu-18.1.3.drv",
    "lldb": "/nix/store/q0sbw0c8mmq2jrp0x2np0qzy844ins9m-lldb-x86_64-unknown-linux-gnu-18.1.3.drv",
    "lldb-manpages": "/nix/store/ahc4lx7ydsjd9xd6x1qv7nskywdxyh74-lldb-manpages-x86_64-unknown-linux-gnu-18.1.3.drv",
    "llvm": "/nix/store/780h4j3qrp0cg8l0ziz5plxwbc739pj6-llvm-x86_64-unknown-linux-gnu-18.1.3.drv",
    "llvm-manpages": "/nix/store/ffkyqghyrg140sdfqkpfs0hsqanm6fmw-llvm-manpages-x86_64-unknown-linux-gnu-18.1.3.drv",
    "mlir": "/nix/store/g36g936gvni90whdp0q1kqp232v2ijsq-mlir-x86_64-unknown-linux-gnu-18.1.3.drv",
    "openmp": "/nix/store/q8cqkfgcwkmcjazbk20dglb4g1m4vln9-openmp-x86_64-unknown-linux-gnu-18.1.3.drv",
    "stdenv": "/nix/store/h3df312xf5dai94ki27nf023k812nykw-stdenv-linux.drv"
  },
  "llvmPackages_git": {
    "bintools": "/nix/store/rasmvlhb3k6aazj0xbayznw0bdpymccc-llvm-binutils-wrapper-19.0.0-unstable-2024-04-07.drv",
    "bintools-unwrapped": "/nix/store/pgyjkjhl4j24hrblv74bvbkg7x4li4sz-llvm-binutils-19.0.0-unstable-2024-04-07.drv",
    "bintoolsNoLibc": "/nix/store/53ps6rs648lnkyjn2xg6ag9xrj490kqi-llvm-binutils-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clang": "/nix/store/hh93sb9jn7271sabfq3i87dihj6nr9ca-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clang-manpages": "/nix/store/ilz7px2c2967z4bv65hb1cqc2drlpcx0-clang-manpages-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "clang-unwrapped": "/nix/store/lk2iyg2j1fkcnwi0d7p6mqzz8i8y1niz-clang-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "clangNoCompilerRt": "/nix/store/7p0q4yfqlnhldqvcyz706nwqwa8bgwvq-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/v0zf1vvxlj0clq4l491rbi3w3y4wxmzs-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clangNoLibc": "/nix/store/qgswdypjvwn93jvzsvglaxy4c8895757-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clangNoLibcxx": "/nix/store/h0zjrr6hjvnajh2n43bwhfas5bzyji2y-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "clangUseLLVM": "/nix/store/hh93sb9jn7271sabfq3i87dihj6nr9ca-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "compiler-rt": "/nix/store/6rr90g6calc3g91n9vrdhnl7r40x7vg3-compiler-rt-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "compiler-rt-libc": "/nix/store/kkw9vyrrlknssjx2yvdfxzirvh0xdxgq-compiler-rt-libc-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "compiler-rt-no-libc": "/nix/store/6rr90g6calc3g91n9vrdhnl7r40x7vg3-compiler-rt-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "libclang": "/nix/store/lk2iyg2j1fkcnwi0d7p6mqzz8i8y1niz-clang-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "libcxx": "/nix/store/aqszhmpxbh9hc348schxkvxngsj62k6a-libcxx-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "libcxxClang": "/nix/store/pl9xw8hf0kkgpx2yx2x357g0yrn2pj04-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "libcxxStdenv": "/nix/store/j2yn37ym5iblzs3j071ilphvjc5qjqh2-stdenv-linux.drv",
    "libllvm": "/nix/store/q423bm1acrfsx9920l196r8l226bp9yb-llvm-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "libstdcxxClang": "/nix/store/0pchfkly3ck9mvqhjiq6h666if2slcjg-clang-wrapper-19.0.0-unstable-2024-04-07.drv",
    "libunwind": "/nix/store/k3x92247w9vryb635xlfra86h7ii8px6-libunwind-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "lld": "/nix/store/xsv0dm827686gqs55g03j07s6rv98van-lld-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "lldb": "/nix/store/3f6251m9g8j4r2r7dxz6r6fzhfx5rx9h-lldb-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "lldb-manpages": "/nix/store/07773lfs5r2jr67waaisxxylwzycy8w9-lldb-manpages-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "llvm": "/nix/store/q423bm1acrfsx9920l196r8l226bp9yb-llvm-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "llvm-manpages": "/nix/store/5v2dnpnf1wz31h7jzja6p1zg6fcl8x5s-llvm-manpages-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "mlir": "/nix/store/5vn9xbzfv7fgi4ghqa99rzm67lrnpq7l-mlir-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "openmp": "/nix/store/iw2h3134zyl3qc50mn8ahazsqaam9fc1-openmp-x86_64-unknown-linux-gnu-19.0.0-unstable-2024-04-07.drv",
    "stdenv": "/nix/store/krxllcjazybl7nzx5kvkj7zq069h54f9-stdenv-linux.drv"
  },
  "llvmPackages_latest": {
    "bintools": "/nix/store/qpxd5x8v7flbmnk8i89gys6gb6bxxw3p-llvm-binutils-wrapper-17.0.6.drv",
    "bintools-unwrapped": "/nix/store/l86fff20zw7kqqqhrdsxln9bjyvs2brn-llvm-binutils-17.0.6.drv",
    "bintoolsNoLibc": "/nix/store/qsqp7z6icyrqh961lnl14aw9qdk1dcsv-llvm-binutils-wrapper-17.0.6.drv",
    "clang": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "clang-manpages": "/nix/store/wirbw926f3b9pqm6rziv1qpk0jinl3c2-clang-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clang-unwrapped": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "clangNoCompilerRt": "/nix/store/9q317pqnrg8yqg0gza672jx1qcffryjn-clang-wrapper-17.0.6.drv",
    "clangNoCompilerRtWithLibc": "/nix/store/dk91nb1chiijsrrv6k34363rr4k744pm-clang-wrapper-17.0.6.drv",
    "clangNoLibc": "/nix/store/ngagpmvvsdxqhmkwbmg8kizi4l47dzh0-clang-wrapper-17.0.6.drv",
    "clangNoLibcxx": "/nix/store/2rn7874qznk7ph6xc3ampw0k20fi5ydf-clang-wrapper-17.0.6.drv",
    "clangUseLLVM": "/nix/store/gn1s7rdh77wv9fhkh12y424kl96hjdk4-clang-wrapper-17.0.6.drv",
    "compiler-rt": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-libc": "/nix/store/5kmbakpzyd1ql453kygg52xlmg192m1s-compiler-rt-libc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "compiler-rt-no-libc": "/nix/store/gg5wb6kzr8hsikvlnrwdimzwgcqb0v5l-compiler-rt-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclang": "/nix/store/g8adnf8j1ywkxxvpdgg8i7l4xpfj4n13-clang-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libclc": "/nix/store/gdxb2790x9rdyrr4l12s4m27frh18fkp-libclc-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxx": "/nix/store/z5gq8lai70wdq941fbgxiz52ivnnr1rh-libcxx-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libcxxClang": "/nix/store/z1h8nnkf8q6kk6i2sar4mfjk66a3ay42-clang-wrapper-17.0.6.drv",
    "libcxxStdenv": "/nix/store/qmbvhgr68flaq0cqwn72z68x84f4k88a-stdenv-linux.drv",
    "libllvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "libstdcxxClang": "/nix/store/yq61pr3xszsjw2g452q1l2rcrmvbsp4w-clang-wrapper-17.0.6.drv",
    "libunwind": "/nix/store/z2bnkib7n3m2hvcmcl7xml1fdsfc8djb-libunwind-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lld": "/nix/store/afr1k5ifhaglp948qyz49qymh0g4y54l-lld-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb": "/nix/store/8c7vg25an12w5zcv3icyfm98wi2dxy95-lldb-x86_64-unknown-linux-gnu-17.0.6.drv",
    "lldb-manpages": "/nix/store/5fsxvvfpy9lj6w95mn1ab4f6fhn81627-lldb-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm": "/nix/store/d24kmmwk3r66n7ccwz38c5zz8f4riv8f-llvm-x86_64-unknown-linux-gnu-17.0.6.drv",
    "llvm-manpages": "/nix/store/fyxwyh1p9m7sj8dibg2bxdr1y1kk09xm-llvm-manpages-x86_64-unknown-linux-gnu-17.0.6.drv",
    "mlir": "/nix/store/lz12b4p6wnnsj5nmbr0zlh4a5l9dsck6-mlir-x86_64-unknown-linux-gnu-17.0.6.drv",
    "openmp": "/nix/store/0chn6xlmx41bhfl9dszpx1sydr3w9v87-openmp-x86_64-unknown-linux-gnu-17.0.6.drv",
    "stdenv": "/nix/store/b2qy0ijsri9lci4snl9m5zvp8a7zal6i-stdenv-linux.drv"
  }
}

@pwaller pwaller marked this pull request as ready for review April 27, 2024 21:36
@pwaller
Copy link
Contributor Author

pwaller commented Apr 27, 2024

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Apr 29, 2024
@pwaller
Copy link
Contributor Author

pwaller commented May 3, 2024

Thanks for the approval @RossComputerGuy. I don't have merge permissions, can someone please merge for me?

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 3, 2024
This patch is not intended to introduce any functional change. drvPaths
should remain unchanged; if they do change, it's a bug.

Prior to this patch, a set of packages gets passed through from the
llvmPackages top level function to the individual packages via
callPackages, which is a newScope constructed with some specific
arguments.

As it stands this makes it harder to override dependencies of LLVM; for
example take ncurses. If you want to override it, it is an argument to
libllvm, however, if you override libllvm you then have to write a lot
of code to have correctly overridden clang, given how llvmPackages is
previously composed (out of tools and libraries).

Instead, I propose to make sure that all the dependencies of all
llvmPackages are listed as an inputs to the top leve llvmPackages,
and then the resulting newScope will contain all of them. This in
turn will make `llvmPackages.override` work as expected for any
input to each of the llvm packages.

We'll achieve this by first simplifying the code a bit and ensuring that
all arguments to llvmPackage get forwarded to all packages (via
`{}@args`).

This represents a chance to simplify things a bit so I propose doing it
in two steps:

1. This patch: Simplify argument pass through.
2. (Later): Ensure all arguments to each llvm package are listed in the
   top level `llvm/X/default.nix`.

Once the second patch lands, this means that `(llvmPackages.override {
ncurses = myncurses; }).clang` would consist of a clang whose libllvm
had the ncurses overridden. This is not the case prior to this patch.

Signed-off-by: Peter Waller <[email protected]>
@pwaller pwaller force-pushed the llvm-simplify-arg-passthrough branch from 7819777 to 8164fd6 Compare May 25, 2024 10:44
@pwaller
Copy link
Contributor Author

pwaller commented May 25, 2024

Rebased. I don't have merge permissions, please can someone merge?

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 25, 2024
@rrbutani rrbutani added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 27, 2024
@pwaller pwaller mentioned this pull request May 28, 2024
13 tasks
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 29, 2024
@Artturin Artturin added the backport release-24.05 Backport PR automatically label May 29, 2024
@RossComputerGuy RossComputerGuy added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 16, 2024
@Artturin Artturin merged commit 23b6177 into NixOS:master Jun 16, 2024
22 checks passed
Copy link
Contributor

@pwaller pwaller deleted the llvm-simplify-arg-passthrough branch June 16, 2024 13:56
pwaller added a commit to pwaller/nixpkgs that referenced this pull request Jun 16, 2024
... consistently.

Further to NixOS#307211, allow overriding arguments through llvmPackages.override.

This makes it possible to override any dependency of LLVM or
clang by overriding it on `llvmPackages.override { <dependency> = ...; }`.

This is useful in development or customization where sometimes it is
desirable to turn features on or off.

Without this patch the only way to for example override ncurses was to
do `overriddenLLVM = llvmPackages.llvm.override { ncurses }`, but then
you would have to thread `overriddenLLVM` as dependencies into clang and
other packages, which results in quite a difficult expression to write
correctly in cross compilation scenarios.

Signed-off-by: Peter Waller <[email protected]>
github-actions bot pushed a commit that referenced this pull request Jun 20, 2024
... consistently.

Further to #307211, allow overriding arguments through llvmPackages.override.

This makes it possible to override any dependency of LLVM or
clang by overriding it on `llvmPackages.override { <dependency> = ...; }`.

This is useful in development or customization where sometimes it is
desirable to turn features on or off.

Without this patch the only way to for example override ncurses was to
do `overriddenLLVM = llvmPackages.llvm.override { ncurses }`, but then
you would have to thread `overriddenLLVM` as dependencies into clang and
other packages, which results in quite a difficult expression to write
correctly in cross compilation scenarios.

Signed-off-by: Peter Waller <[email protected]>
(cherry picked from commit 40a7f21)
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Oct 11, 2024
This change implements a leftover task from NixOS#307211, namely passing
monorepoSrc to the different llvmPackages_13 package expressions. Before
this change, all packages llvmPackages_13 would be built from a
subdirectory of the full LLVM monorepo tree. After this change only the
relevant directories are made available at build time. This

- reduces the size of the source that needs to be made available to the
  builder.
- prevents LLVM from sidestepping our instructions and including extra
  sources from other directories it shouldn't.

Since LLVM 12 and 13 don't have the `cmake` directory at the top level,
the runCommand expressions filtering the source need to be adjusted, but
this causes no rebuild for any other LLVM version (ofborg should confirm
this).

The only problem encountered was in lld:

1. We need to make the patch to the inclusion of libunwind headers
   unconditional now. lld needs this on non-darwin as well. In the
   full monorepo, LLVM_MAIN_SRC_DIR would be set, so the patch
   wasn't necessary.
2. For some reason, the component is built from a different directory in
   LLVM 12 and 13 so we can't unify postPatch between 12 and 13,
   unfortunately.

Change was tested by building the following expression on x86_64-linux.

  with import ./. {};
  builtins.removeAttrs llvmPackages_13 [ "lldb" "lldbPlugins" ]'

lld was also tested on aarch64-darwin.
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Oct 12, 2024
This change implements a leftover task from NixOS#307211, namely passing
monorepoSrc to the different llvmPackages_13 package expressions. Before
this change, all packages llvmPackages_13 would be built from a
subdirectory of the full LLVM monorepo tree. After this change only the
relevant directories are made available at build time. This

- reduces the size of the source that needs to be made available to the
  builder.
- prevents LLVM from sidestepping our instructions and including extra
  sources from other directories it shouldn't.

Since LLVM 12 and 13 don't have the `cmake` directory at the top level,
the runCommand expressions filtering the source need to be adjusted, but
this causes no rebuild for any other LLVM version (ofborg should confirm
this).

The only problem encountered was in lld:

- We need to make the patch to the inclusion of libunwind headers
  unconditional now. lld needs this on non-darwin as well. In the
  full monorepo, LLVM_MAIN_SRC_DIR would be set correctly, so the
  patch wasn't necessary.
- The substitute mechanism for LLVM 12 and 13 can't be unified yet since
  LLVM 12 still uses a non monorepo build, so we come up with a
  different LLVM_MAIN_SRC_DIR.

Change was tested by building the following expression on x86_64-linux.

    with import ./. {};
    builtins.removeAttrs llvmPackages_13 [ "lldb" "lldbPlugins" ]'

lld was also tested on aarch64-darwin.
sternenseemann added a commit that referenced this pull request Oct 14, 2024
This change implements a leftover task from #307211, namely passing
monorepoSrc to the different llvmPackages_13 package expressions. Before
this change, all packages llvmPackages_13 would be built from a
subdirectory of the full LLVM monorepo tree. After this change only the
relevant directories are made available at build time. This

- reduces the size of the source that needs to be made available to the
  builder.
- prevents LLVM from sidestepping our instructions and including extra
  sources from other directories it shouldn't.

Since LLVM 12 and 13 don't have the `cmake` directory at the top level,
the runCommand expressions filtering the source need to be adjusted, but
this causes no rebuild for any other LLVM version (ofborg should confirm
this).

The only problem encountered was in lld:

- We need to make the patch to the inclusion of libunwind headers
  unconditional now. lld needs this on non-darwin as well. In the
  full monorepo, LLVM_MAIN_SRC_DIR would be set correctly, so the
  patch wasn't necessary.
- The substitute mechanism for LLVM 12 and 13 can't be unified yet since
  LLVM 12 still uses a non monorepo build, so we come up with a
  different LLVM_MAIN_SRC_DIR.

Change was tested by building the following expression on x86_64-linux.

    with import ./. {};
    builtins.removeAttrs llvmPackages_13 [ "lldb" "lldbPlugins" ]'

lld was also tested on aarch64-darwin.
yuanwang-wf pushed a commit to yuanwang-wf/nixpkgs that referenced this pull request Oct 17, 2024
This change implements a leftover task from NixOS#307211, namely passing
monorepoSrc to the different llvmPackages_13 package expressions. Before
this change, all packages llvmPackages_13 would be built from a
subdirectory of the full LLVM monorepo tree. After this change only the
relevant directories are made available at build time. This

- reduces the size of the source that needs to be made available to the
  builder.
- prevents LLVM from sidestepping our instructions and including extra
  sources from other directories it shouldn't.

Since LLVM 12 and 13 don't have the `cmake` directory at the top level,
the runCommand expressions filtering the source need to be adjusted, but
this causes no rebuild for any other LLVM version (ofborg should confirm
this).

The only problem encountered was in lld:

- We need to make the patch to the inclusion of libunwind headers
  unconditional now. lld needs this on non-darwin as well. In the
  full monorepo, LLVM_MAIN_SRC_DIR would be set correctly, so the
  patch wasn't necessary.
- The substitute mechanism for LLVM 12 and 13 can't be unified yet since
  LLVM 12 still uses a non monorepo build, so we come up with a
  different LLVM_MAIN_SRC_DIR.

Change was tested by building the following expression on x86_64-linux.

    with import ./. {};
    builtins.removeAttrs llvmPackages_13 [ "lldb" "lldbPlugins" ]'

lld was also tested on aarch64-darwin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 1 This PR was reviewed and approved by one reputable person backport release-24.05 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants