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

Support rustflags from cargo config #257

Closed
wants to merge 1 commit into from

Conversation

paholg
Copy link

@paholg paholg commented Mar 26, 2021

Cargo will ignore any rustflags set in a config file if RUSTFLAGS is
set. Because cargo-fuzz always sets RUSTFLAGS, flags in config files
are always ignored.

So, instead of just pulling prior flags from RUSTFLAGS, we can rely on
cargo to find them for us.

Cargo will ignore any rustflags set in a config file if `RUSTFLAGS` is
set. Because cargo-fuzz always sets `RUSTFLAGS`, flags in config files
are always ignored.

So, instead of just pulling prior flags from `RUSTFLAGS`, we can rely on
cargo to find them for us.
@paholg
Copy link
Author

paholg commented Mar 27, 2021

The build failure appears to be a transient network error.

@fitzgen
Copy link
Member

fitzgen commented Apr 8, 2021

I really don't want to pull in cargo as a library. It's a ton of dev overhead; really slow to compile and we'll be chasing updates every 6 weeks. I talked with @alexcrichton and he confirmed that using cargo as a library is discouraged, and that instead we should file an issue on the cargo repo to add a CLI flag to cargo to print out the information we need, and then we can just spawn a subprocess to get this information.

Can you file a bug upstream requesting a CLI flag to read the rustflags from the cargo config, and then rewrite this PR to use a cargo sub-process? Thanks!

@paholg
Copy link
Author

paholg commented Apr 8, 2021

Fair enough, will do.

@paholg paholg closed this Apr 8, 2021
@paholg
Copy link
Author

paholg commented Apr 13, 2021

It turns out this was just recently implemented in cargo via cargo config, so I just need to wait for it to stabilize.

rust-lang/cargo#9302

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