-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
lib.systems: introduce toolchain, cc, and bintools attributes #365057
base: master
Are you sure you want to change the base?
Conversation
7a3eca0
to
2a005fa
Compare
9c8b44b
to
f6da63d
Compare
The main idea and motivation is in: pkgs/stdenv/cross/default.nix |
f6da63d
to
ec79349
Compare
10cd2ba
to
2b4d320
Compare
lib/systems/default.nix
Outdated
@@ -112,15 +131,24 @@ let | |||
else if final.isNone then "newlib" | |||
# TODO(@Ericson2314) think more about other operating systems | |||
else "native/impure"; | |||
|
|||
unwinderlib = | |||
/**/ if final.useLLVM || final.useArocc || final.useZig || final.isDarwin then "libunwind" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Darwin be a distinct value? It uses the system unwinder, which is based on libunwind, but it’s part of libSystem and linked automatically. If so, I’d make it something like libunwind-system
. That should also simplify the checks in LLVM for whether to link libunwind.
@@ -120,8 +120,8 @@ let | |||
|
|||
useGccForLibs = useCcForLibs | |||
&& libcxx == null | |||
&& targetPlatform.rtlib == "libgcc" | |||
&& !targetPlatform.isDarwin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the Darwin check be dropped since targetPlatform.rtlib
will be compiler-rt
on Darwin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about when people change the value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone changes it to libgcc
on Darwin?
bed4343
to
22a0ffb
Compare
I fixed the rust stuff a bit more so it's based on build and target not quite aligning which should match the cases for the LLVM hack. I've also got the bintools evaling to the same value before the changes so the rebuild counts for Darwin and Linux should be little. |
eeed51a
to
37e3b75
Compare
37e3b75
to
e018fc3
Compare
e018fc3
to
e842a3b
Compare
e842a3b
to
2ef4251
Compare
Things done
Replaces
useLLVM
,useArocc
, anduseZig
withtoolchain
,cc
,linker
, andbintools
attributes. This might not produce any rebuilds but we'll see. This has the advantage of preventingusing${compiler}
flags from colliding and not working correctly if we were to stack multiplepkgs*
together.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.