treewide: Allow the linker to be chosen independently#122778
treewide: Allow the linker to be chosen independently#122778Ericson2314 merged 2 commits intoNixOS:stagingfrom
Conversation
|
Result of 38 packages skipped due to time constraints:
3 packages built successfully:
|
|
This breaks the firefox build on x86_64-linux. |
|
Yeah i found I think workarounds for everything but Firefox. Hmmm. |
168194c to
2c99ee7
Compare
|
Firefox now has a (somewhat ugly) workaround. I don't really like the override, but writing down every possible combination is also a bit much. That's when I wish we had a relational language / solver :D. |
|
@matthewbauer It's been a minute, but I'd love for you to way on this. I first mentioned doing something like this quite some time ago :). |
Add a comment with explanation, which I should have done all along.
ddde8a3 to
96f73d6
Compare
|
OK the fix for firefox is a lot less ugly now. |
lovesegfault
left a comment
There was a problem hiding this comment.
Left two small nits, but the changes look good overall to me. I suspect it may be worth it to do a separate hydra run of this just to be sure, even if this is going into staging and not master. Up to the author.
sternenseemann
left a comment
There was a problem hiding this comment.
LGTM. Not sure if bootBintools is the clearest terminology in this case, but OTOH I am also unable to express what I think “boot” is supposed to mean in that context.
This will begin the process of breaking up the `useLLVM` monolith. That is good in general, but I hope will be good for NetBSD and Darwin in particular. Co-authored-by: sterni <sternenseemann@systemli.org>
84a73a7 to
18c38f8
Compare
|
@sternenseemann Yeah I don't really like the name either, but I don't intend for it to be really stable so we can just change it later. I somewhat hope as the bootstrapping logic becomes more standardized across all the combinations, we can move it out of the default.nix anyways. |
PR NixOS#122778 allowed the linker being chosen independently from useLLVM which also affected pkgsLLVM where we were relying on this behavior. For platform sets assembled from scratch useLLVM still implies linker == "lld", however in the case of pkgsLLVM we update the current platform via the set update operator which means that `linker` won't be re-evaluated. Using ld.bfd with pkgsLLVM is okay to a certain extent, but with C++ things begin to break. We fix this by setting linker explicitly.
PR #122778 allowed the linker being chosen independently from useLLVM which also affected pkgsLLVM where we were relying on this behavior. For platform sets assembled from scratch useLLVM still implies linker == "lld", however in the case of pkgsLLVM we update the current platform via the set update operator which means that `linker` won't be re-evaluated. Using ld.bfd with pkgsLLVM is okay to a certain extent, but with C++ things begin to break. We fix this by setting linker explicitly.
|
|
||
| stdenvNoLibs = mkStdenvNoLibs stdenv; | ||
| stdenvNoLibs = | ||
| if stdenv.hostPlatform != stdenv.buildPlatform && (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isDarwin.useLLVM or false) |
There was a problem hiding this comment.
if stdenv.hostPlatform != stdenv.buildPlatform && (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isDarwin.useLLVM or false)
should be
if stdenv.hostPlatform != stdenv.buildPlatform && (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.useLLVM or false)
nix-repl> pkgsCross.x86_64-freebsd.stdenv.hostPlatform.useLLVM
true
There was a problem hiding this comment.
Oops! Thanks for catching!
#122778 (comment) (cherry picked from commit 55405ad)
Motivation for this change
This will begin the process of breaking up the
useLLVMmonolith. Thatis good in general, but I hope will be good for NetBSD and Darwin in
particular.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)