Skip to content
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: Use CARGO_ENCODED_RUSTFLAGS to support spaces in environment paths #186

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarijnS95
Copy link
Member

Blocked on rust-lang/cargo#14398
For #128

@@ -465,7 +465,10 @@ impl CargoBuild {
}

pub fn exec(mut self) -> Result<()> {
self.cargo_target_env("RUSTFLAGS", &self.rust_flags.clone());
// TODO: There's no target-triple specific ENCODED_RUSTFLAGS: https://github.com/rust-lang/cargo/issues/14398

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why we need a target triple specific version of this flag, can't we use the regular version?

Copy link
Member Author

@MarijnS95 MarijnS95 Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make sure that none of these RUSTFLAGS (and C(XX)FLAGS) apply to binaries built for the host, i.e. build.rs. There used to be some additional complexity with the existence of target-applies-to-host, but I can't remember the details for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants