llvmPackages.clang: move add-nostdlibinc-flag.patch to cc-wrapper#356162
llvmPackages.clang: move add-nostdlibinc-flag.patch to cc-wrapper#356162emilazy merged 1 commit intoNixOS:stagingfrom
Conversation
|
Given that apparently the cc @NixOS/llvm @NixOS/stdenv |
|
b941415 to
39b8ec7
Compare
Remove a patch to decrease the divergence from upstream. Motivation is a continuation of trying to reduce the number of clang builds floating around. Wrapper builds are cheap, compiler builds are not. It's expected that this patch can be removed at some point and replaced with some other cc-wrapper logic. This will be a little bit easier with the logic already in the cc-wrapper. Ongoing discussion in NixOS#191152. It would be nice to drop this but we think it's probably needed at least on systems where /usr/include may be available to prevent the possibility of picking up unwanted includes. One potential method for eliminating nostdlibinc in the future is by providing a non-existent -sysroot but that was reverted in NixOS#213185, and remains a can of worms. Signed-off-by: Peter Waller <p@pwaller.net>
39b8ec7 to
7047ba9
Compare
|
Latest force removes extraneous blankline. |
|
Successfully built |
In theory, Clang is a cross-compiler by default. After the following PRs, this is true on platforms other than Darwin. - #355532 - #356162 The reason Darwin needs additional changes is it only overlays Clang and LLVM in the native target case. When cross-compiling, it builds Clang and LLVM again. This is unnecessary as long as the Darwin stdenv avoids propagating the Clang wrappers, which are target-dependent. In theory, ld64 is also a cross-linker by default. Realizing that for nixpkgs requires additional work that will be done separately.
Remove a patch to decrease the divergence from upstream.
Motivation is a continuation of trying to reduce the number of clang
builds floating around. Wrapper builds are cheap, compiler builds are
not.
It's expected that this patch can be removed at some point and replaced
with some other cc-wrapper logic. This will be a little bit easier with
the logic already in the cc-wrapper.
Ongoing discussion in #191152. It would be nice to drop this but we
think it's probably needed at least on systems where /usr/include may be
available to prevent the possibility of picking up unwanted includes.
One potential method for eliminating nostdlibinc in the future is by
providing a non-existent -sysroot but that was reverted in #213185, and
remains a can of worms.
Signed-off-by: Peter Waller p@pwaller.net
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.