Skip to content

Conversation

@expenses
Copy link

@expenses expenses commented Feb 6, 2024

${CLANG_INSTALL_PREFIX}/lib/clang/${LLVM_VERSION_MAJOR}/include is invalid on systems that store the libs for clang seperately from wherever CLANG_INSTALL_PREFIX is.

E.g. on Nix/NixOS it points to /nix/store/0y99g3631mcl08ym46a5803g0hr4rc8j-clang-16.0.6 which looks like:

/nix/store/0y99g3631mcl08ym46a5803g0hr4rc8j-clang-16.0.6/
├── bin
...
│   ├── clang -> clang-16
│   ├── clang-16
...
└── share
    ├── clang
...

but also /nix/store/l92dv1igdpgkb1mxjv9rabvk795k45ih-clang-16.0.6-lib which looks like:

/nix/store/l92dv1igdpgkb1mxjv9rabvk795k45ih-clang-16.0.6-lib
├── lib
│   ├── clang
│   │   └── 16
│   │       └── include
│   │           ├── __clang_cuda_builtin_vars.h
...
│   ├── libclang-cpp.so -> libclang-cpp.so.16
│   ├── libclang-cpp.so.16
...

Using a define for this directory lets me overwrite the value like so:
https://github.com/expenses/babble-nix/blob/b5ecce0864ccdad936adadd6514faf26fe8e93f8/package.nix#L14-L16

I'm happy to bikeshed on the naming of this variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant