clang: don't set machine flags for overridden target#317273
Merged
alyssais merged 2 commits intoNixOS:stagingfrom Jun 15, 2024
Merged
clang: don't set machine flags for overridden target#317273alyssais merged 2 commits intoNixOS:stagingfrom
alyssais merged 2 commits intoNixOS:stagingfrom
Conversation
27 tasks
Member
|
The Swift change (paralleling #301103) looks right to me, but I'm building it and a Swift package just to make sure everything works out |
Member
|
rustc built for me on this PR's commit on aarch64-darwin (the whitespace change doesn't cause rebuild). |
Samasaur1
approved these changes
Jun 5, 2024
Member
Samasaur1
left a comment
There was a problem hiding this comment.
My Swift package builds and runs. LGTM
Member
@alyssais are you working on that? |
Member
Author
|
Should have it done later today. |
Member
Author
Mic92
approved these changes
Jun 10, 2024
Member
Mic92
left a comment
There was a problem hiding this comment.
Passes my eye-ball test, didn't test it.
We already did this for -march in 12b0e8a ("clang: don't set -march for overridden target"), but it should have been done for all machine flags, for the same reason. Example bug this fixes: nix-shell -E ' with import ./. { crossSystem = { system = "powerpc64le-linux"; gcc.cpu = "power10"; }; }; clangStdenv.mkDerivation { name = "test"; } ' --run '$CC -target wasm32-unknown-unknown -c /dev/null' Which previously failed with: clang: error: unsupported option '-mcpu=' for target 'wasm32-unknown-unknown'
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/is-there-a-way-to-install-a-macos-pkg-from-an-url/49660/10 |
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
We already did this for -march in 12b0e8a ("clang: don't set -march for overridden target"), but it should have been done for all machine flags, for the same reason.
Example bug this fixes:
Which previously failed with:
@vcunat could you please test whether this fixes rustc on aarch64-darwin, as reported in #309580 (comment)? If it does, we can make a temporary fix on staging-next.
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.