Skip to content

cargo: Use CARGO_ENCODED_RUSTFLAGS to support spaces in environment paths#186

Draft
MarijnS95 wants to merge 1 commit intomasterfrom
encoded-rustflags
Draft

cargo: Use CARGO_ENCODED_RUSTFLAGS to support spaces in environment paths#186
MarijnS95 wants to merge 1 commit intomasterfrom
encoded-rustflags

Conversation

@MarijnS95
Copy link
Copy Markdown
Member

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


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
Copy link
Copy Markdown

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
Copy Markdown
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