Skip to content

Allow for opt-level=s,z during bootstrap #33453

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

Closed
wants to merge 1 commit into from
Closed

Allow for opt-level=s,z during bootstrap #33453

wants to merge 1 commit into from

Conversation

MagaTailor
Copy link

@MagaTailor MagaTailor commented May 6, 2016

Until rustc starts accepting both -O and -C opt-level on the same command line (the last option given should take precedence, other flags are also affected) this change enables using e.g.:

RUSTFLAGS=-Copt-level=z during bootstrap, as multiple opt-level flags happen to be handled correctly.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (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.

@brson
Copy link
Contributor

brson commented May 6, 2016

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 6, 2016

📌 Commit a345842 has been approved by brson

@MagaTailor
Copy link
Author

MagaTailor commented May 6, 2016

@brson The tests set the -O option again after not trying to unset the -C opt-level which lead to the clash I'd mentioned in the first comment. Maybe the compiler's option parsing should get fixed first and only then I'd revisit this Makefile issue?

@brson
Copy link
Contributor

brson commented May 6, 2016

@bors r-

@petevine Hm, I guess I don't understand what the issue is. Am I correct that this patch fixes the bootstrap when overriding -C opt-level but the test suite is still broken? If that's the case then this does seem like a harmless incremental improvement, but I'm happy to hold off if that's what you want.

@MagaTailor
Copy link
Author

MagaTailor commented May 6, 2016

Yeah thanks, I inadvertently broke the tests which in their own tests.mk file try to unset just the preexisting -O and then set it back again for release builds.

If you want me to unset all possible opt-levels, will the syntax like:
subst -C opt-level=[123][sz],, work in that Makefile?

@sanxiyn
Copy link
Member

sanxiyn commented May 8, 2016

FYI, option parsing issue is #32352.

@sanxiyn
Copy link
Member

sanxiyn commented May 8, 2016

@brson This patch can't be merged as-is because it breaks tests even if you don't override RUSTFLAGS.

@MagaTailor
Copy link
Author

I'll close for the time being as it seems environment RUSTFLAGS wouldn't even take precedence over the Makefile's opts.

@MagaTailor MagaTailor closed this May 8, 2016
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.

6 participants