-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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: Clean up how linux and gcc config is specified #107214
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,6 @@ rec { | |
# Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. | ||
system = parse.doubleFromSystem final.parsed; | ||
config = parse.tripleFromSystem final.parsed; | ||
# Just a guess, based on `system` | ||
platform = platforms.select final; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we continue to export platform for external usage? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this wouldn't work with the renames though... Maybe it's not worth it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, true. I was about to do your change below but I didn't think of that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh post merge I realize the back-compat was already not attempting the linux stuff, oops. |
||
# Determine whether we are compatible with the provided CPU | ||
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu; | ||
# Derived meta-data | ||
|
@@ -79,7 +77,16 @@ rec { | |
}; | ||
isStatic = final.isWasm || final.isRedox; | ||
|
||
kernelArch = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be separate from platform / linux-kernel. This should be a direct mapping from cpu name to linux kernel name. We already have qemuArch and will soon have a "darwinArch" in #105026. This shouldn't be configurable like platform / kernel-arch is. |
||
# Just a guess, based on `system` | ||
inherit | ||
({ | ||
linux-kernel = args.linux-kernel or {}; | ||
gcc = args.gcc or {}; | ||
rustc = args.rust or {}; | ||
} // platforms.select final) | ||
linux-kernel gcc rustc; | ||
|
||
linuxArch = | ||
if final.isAarch32 then "arm" | ||
else if final.isAarch64 then "arm64" | ||
else if final.isx86_32 then "x86" | ||
|
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.