clang: patch like gcc to mangle store path output by __FILE__#424844
clang: patch like gcc to mangle store path output by __FILE__#424844symphorien wants to merge 1 commit intoNixOS:stagingfrom
Conversation
this prevents unwanted references to -dev outputs.
A similar patch exists for gcc.
tested with
```
printf "# 0 \"/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store result/bin/clang -x c - -S -o -
```
emilazy
left a comment
There was a problem hiding this comment.
The general approach seems like it should work, but as I said on the other PR, I’d really like to see this as a simple addition to the cc-wrapper hook, rather than a patch we’ll never be able to upstream.
The only reason a patch was used for GCC was because of the limits on the command‐line arguments, and the activity on the bug tracker there shows that it’s being actively worked on, so we should hopefully be able to drop the GCC patch at some point and use the same logic for both toolchains.
We have a fair number of packages pinning old versions of LLVMs and we have been working on moving Nix‐specific behaviour out of patches (e.g. #356162) to keep unwrapped compilers closer to upstream behaviour and reduce the burden of updates.
|
(I also think that it should be fine to just use the nuked |
This is now handled by the compiler wrapper. I have verified that `webkitgtk_6_0` still has no GCC dependency on `aarch64-linux`, and that `watchman` doesn’t pull in any `dev` outputs on `aarch64-darwin`. Closes: NixOS#424844 Closes: NixOS#426934 Closes: NixOS#427475 Closes: NixOS#428546
|
obsoleted by #429880 |
this prevents unwanted references to -dev outputs. A similar patch exists for gcc.
tested with
the goal is to replace sanitiseHeaderPathsHook because it breaks the filenames of headers in debug symbols and makes gdb useless in template instantiation.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.