Skip to content

Remove -Z no-opt flag. #17419

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

Merged
merged 1 commit into from
Sep 22, 2014
Merged

Remove -Z no-opt flag. #17419

merged 1 commit into from
Sep 22, 2014

Conversation

colrdavidson
Copy link
Contributor

Closes #13649

@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 @nikomatsakis (or someone else) soon.

@huonw
Copy link
Member

huonw commented Sep 21, 2014

I'm not in favour of this just yet, at least until we have (a plan for) an equivalent way to disable optimisations with the Rust makeflies. If you want to build something unoptimised the choices are make <target> RUSTFLAGS='-Z no-opt', or extracting the correct compiler invocations and removing the -O flags, the former is definitely easier. (Reconfiguring with --disable-optimize doesn't quite do the same thing, since that would require redoing the whole bootstrap without optimisation, while RUSTFLAGS allows for a quicker edit-compile cycle.)

If, e.g., the Rust makefiles removed the -O flag when passed NO_OPT, or set --opt-level to n when given OPT_LEVEL=n then this is good. (This handling all seems to be around line 111 of mk/main.mk, if you feel like tackling it.)

@colrdavidson
Copy link
Contributor Author

It looks like this can already be achieved with CFG_DISABLE_OPTIMIZE=1 make.

bors added a commit that referenced this pull request Sep 21, 2014
@bors bors closed this Sep 22, 2014
@bors bors merged commit b2b0737 into rust-lang:master Sep 22, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 23, 2024
…nsion, r=Veykril

Filter builtin macro expansion

This PR adds a filter on the types of built in macros that are allowed to be expanded.

Currently, This list of allowed macros contains, `stringify, cfg, core_panic, std_panic, concat, concat_bytes, include, include_str, include_bytes, env` and `option_env`.

Fixes rust-lang#14177
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.

remove the -Z no-opt flag
4 participants