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
buildRustCrate: Set target_os to "macos" on darwin #33137
buildRustCrate: Set target_os to "macos" on darwin #33137
Conversation
34ec24d
to
6f40d72
Compare
Could you provide a small example to test this? |
bc52b78
to
405acb7
Compare
The rust compiler uses "macos" as "target_os" conditional on Mac OS[1] [1] https://github.com/rust-lang/rust/blob/8e7a609e635b728eba65d471c985ab462dc4cfc7/src/librustc_back/target/x86_64_apple_darwin.rs#L29
405acb7
to
bdf031d
Compare
Hi, sorry for the late response
Sure! but I'm not sure what you might consider a test. |
Ack, sorry this was missed. Just hit this myself, I'll verify this fixes my issue (building |
@@ -98,7 +98,7 @@ let makeDeps = dependencies: | |||
export CARGO_PKG_AUTHORS="${authors}" | |||
|
|||
export CARGO_CFG_TARGET_ARCH=${buildPlatform.parsed.cpu.name} | |||
export CARGO_CFG_TARGET_OS=${buildPlatform.parsed.kernel.name} | |||
export CARGO_CFG_TARGET_OS=${if buildPlatform.isDarwin then "macos" else buildPlatform.parsed.kernel.name} |
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.
@marsam Can you add a comment with a link to https://github.com/rust-lang-nursery/rust-forge/issues/101 which suggests that the target_os values are as-yet undocumented?
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.
Added in 98ddba1
@GrahamcOfBorg eval |
The rust compiler uses "macos" as "target_os" conditional on Mac OS[1]
[1] https://github.com/rust-lang/rust/blob/8e7a609e635b728eba65d471c985ab462dc4cfc7/src/librustc_back/target/x86_64_apple_darwin.rs#L29
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)