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

Provide option to restrict RUSTFLAGS to non-build-dependencies #3739

Open
Manishearth opened this issue Feb 21, 2017 · 3 comments
Open

Provide option to restrict RUSTFLAGS to non-build-dependencies #3739

Manishearth opened this issue Feb 21, 2017 · 3 comments
Labels
A-build-dependencies Area: [build-dependencies] A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables A-rustflags Area: rustflags C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@Manishearth
Copy link
Member

Currently, setting RUSTFLAGS will compile build dependencies with the provided options as well. This means that using things like the sanitizer support may not work since the build dependencies will be compiled with sanitizers on as well, and they may fail.

This probably also means that RUSTFLAGS isn't very useful when cross compiling.

(This is making it hard to write nice wrappers for fuzzing)

@alexcrichton
Copy link
Member

As a hack for now you can pass RUSTFLAGS and --target $host_target to get this working

@RalfJung
Copy link
Member

RalfJung commented Aug 22, 2017

I am right now having the opposite problem... I am setting RUSTFLAGS, and it does not get set for build dependencies, leaving me unable to tweak the flags they are compiled with. Has something changed here?

EDIT: Ah, I am using xargo. So probably it passes --target. So now I need a way to set RUSTFLAGS despite cross-compiling...

@carols10cents carols10cents added A-build-dependencies Area: [build-dependencies] A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Oct 2, 2017
@lu-zero
Copy link
Contributor

lu-zero commented Nov 22, 2019

I stumbled upon this trying to building with -Z sanitize, is it possible to make progress on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-dependencies Area: [build-dependencies] A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables A-rustflags Area: rustflags C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

7 participants