-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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.clang: Drop CLANG_DEFAULT_CXX_STDLIB #351685
Conversation
This is better handled in the cc-wrapper, and makes it possible to avoid rebuilding clang in some scenarios. It also appears to be unnecessary since the cc-wrapper already passes -stdlib=libc++ where needed. See: https://github.com/NixOS/nixpkgs/blob/8885a1e21ad43f8031c738a08029cd1d4dcbc2f7/pkgs/build-support/cc-wrapper/default.nix#L603 Signed-off-by: Peter Waller <[email protected]>
Ack |
it is not obvious to me how it helps rebuilding clang. what scenarios does this cause additional rebuilds? I'd think that dropping the cc-wrapper duplicate would be preferable over dropping properly setting the default at compile time. |
The code removed here gets rid of the only place I can see where the clang derivation varies by targetPlatform. Clang is a cross compiler by default. So in the best case you only need to build it once and then you can use it for various things by passing different parameters to it. What I want is to use the clang provided by the existing public build, so I don't need to rebuild it, but then use crossSystem to target something else. This can be arranged with |
aren't the build inputs different tho? |
To note, the flag was misinterpreted in its use. Source |
This is better handled in the cc-wrapper, and makes it possible to avoid
rebuilding clang in some scenarios.
It also appears to be unnecessary since the cc-wrapper already passes
-stdlib=libc++ where needed.
See:
nixpkgs/pkgs/build-support/cc-wrapper/default.nix
Line 603 in 8885a1e
Signed-off-by: Peter Waller [email protected]
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.