-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo install
will ignore the target triple specified in a project directory
#5606
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
c964a45
to
f971a6a
Compare
src/bin/cargo/commands/install.rs
Outdated
let mut compile_opts = args.compile_options(config, CompileMode::Build)?; | ||
compile_opts.build_config.release = !args.is_present("debug"); | ||
// We override target architecture to host architecture since it may be | ||
// set to some other architecture in .cargo/config. | ||
compile_opts.build_config.requested_target = host; |
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.
This could be just .requesetd_target = None
I think
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.
Let me change that and see if that works.
The test should go into https://github.com/rust-lang/cargo/blob/d33c65cbd9d6f7ba1e18b2cdb85fea5a09973d3b/tests/testsuite/install.rs directory. I think the test should write a
and check that |
f971a6a
to
a00f469
Compare
a00f469
to
1bad991
Compare
@matklad Sorry for the delay. I have added the test. Can you check now? |
@bors: r+ |
📌 Commit 1bad991 has been approved by |
`cargo install` will ignore the target triple specified in a project directory Fixes #5441
@alexcrichton it's interesting that we have #5614 as well, which is sort-of the opposite of this pull request. |
☀️ Test successful - status-appveyor, status-travis |
Er oops, should have taken more time to catch up! I'll continue discussion on #5606 |
er, on #5614 |
Fixes #5441