Skip to content

Boostrap: add warning on optimize = false #144010

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
Jul 18, 2025

Conversation

xdoardo
Copy link
Contributor

@xdoardo xdoardo commented Jul 16, 2025

I recently came across a bug that can be traced back to the use of optimize = false in bootstrap.toml in combination with other settings. Following this conversation, this PR adds a warning from bootstrap when optimize = false is used.

I notice that in the same file I edited there are two different styles for warnings (WARN, Warning). I used WARNING because, by happenstance, when testing I got a WARNING that I didn't set a change id: let me know if I can unify the styles in the file I edited.

@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@clubby789
Copy link
Contributor

clubby789 commented Jul 16, 2025

I wonder if it's worth just removing this option (#65352 (comment)) given that it's this bad 🤔
Edit: Probably not

LGTM for now though, thanks

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 16, 2025

📌 Commit 0e423f4 has been approved by clubby789

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2025
fmease added a commit to fmease/rust that referenced this pull request Jul 17, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
fmease added a commit to fmease/rust that referenced this pull request Jul 17, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
bors added a commit that referenced this pull request Jul 17, 2025
Rollup of 15 pull requests

Successful merges:

 - #142300 (Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled)
 - #143271 (Store the type of each GVN value)
 - #143293 (fix `-Zsanitizer=kcfi` on `#[naked]` functions)
 - #143719 (Emit warning when there is no space between `-o` and arg)
 - #143833 (Ban projecting into SIMD types [MCP838])
 - #143846 (pass --gc-sections if -Zexport-executable-symbols is enabled and improve tests)
 - #143879 (parse `const trait Trait`)
 - #143891 (Port `#[coverage]` to the new attribute system)
 - #143967 (constify `Option` methods)
 - #143985 (rustc_public: de-StableMIR-ize)
 - #144008 (Fix false positive double negations with macro invocation)
 - #144010 (Boostrap: add warning on `optimize = false`)
 - #144034 (tests: Test line number in debuginfo for diverging function calls)
 - #144049 (rustc-dev-guide subtree update)
 - #144056 (Copy GCC sources into the build directory even outside CI)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 17, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
bors added a commit that referenced this pull request Jul 17, 2025
Rollup of 12 pull requests

Successful merges:

 - #142300 (Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled)
 - #143271 (Store the type of each GVN value)
 - #143293 (fix `-Zsanitizer=kcfi` on `#[naked]` functions)
 - #143719 (Emit warning when there is no space between `-o` and arg)
 - #143846 (pass --gc-sections if -Zexport-executable-symbols is enabled and improve tests)
 - #143891 (Port `#[coverage]` to the new attribute system)
 - #143967 (constify `Option` methods)
 - #144008 (Fix false positive double negations with macro invocation)
 - #144010 (Boostrap: add warning on `optimize = false`)
 - #144034 (tests: Test line number in debuginfo for diverging function calls)
 - #144049 (rustc-dev-guide subtree update)
 - #144056 (Copy GCC sources into the build directory even outside CI)

r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol added a commit to Kobzol/rust that referenced this pull request Jul 17, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
bors added a commit that referenced this pull request Jul 17, 2025
Rollup of 12 pull requests

Successful merges:

 - #142300 (Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled)
 - #143271 (Store the type of each GVN value)
 - #143293 (fix `-Zsanitizer=kcfi` on `#[naked]` functions)
 - #143719 (Emit warning when there is no space between `-o` and arg)
 - #143846 (pass --gc-sections if -Zexport-executable-symbols is enabled and improve tests)
 - #143891 (Port `#[coverage]` to the new attribute system)
 - #143967 (constify `Option` methods)
 - #144008 (Fix false positive double negations with macro invocation)
 - #144010 (Boostrap: add warning on `optimize = false`)
 - #144034 (tests: Test line number in debuginfo for diverging function calls)
 - #144049 (rustc-dev-guide subtree update)
 - #144056 (Copy GCC sources into the build directory even outside CI)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 18, 2025
Rollup of 10 pull requests

Successful merges:

 - #142300 (Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled)
 - #143649 (Add test for `default_field_values` and `const_default`)
 - #144010 (Boostrap: add warning on `optimize = false`)
 - #144029 (Fix wrong messages from methods with the same name from different traits)
 - #144049 (rustc-dev-guide subtree update)
 - #144053 (Remove install Rust script from CI)
 - #144056 (Copy GCC sources into the build directory even outside CI)
 - #144063 (Add myself to the `infra-ci` reviewer group and adjust some infra auto-labels)
 - #144069 (ci: use windows 22 for all free runners)
 - #144083 (miri sleep tests: increase slack)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 18, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 18, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 18, 2025
…-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
bors added a commit that referenced this pull request Jul 18, 2025
Rollup of 11 pull requests

Successful merges:

 - #142300 (Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled)
 - #143271 (Store the type of each GVN value)
 - #143293 (fix `-Zsanitizer=kcfi` on `#[naked]` functions)
 - #143719 (Emit warning when there is no space between `-o` and arg)
 - #143846 (pass --gc-sections if -Zexport-executable-symbols is enabled and improve tests)
 - #143891 (Port `#[coverage]` to the new attribute system)
 - #143967 (constify `Option` methods)
 - #144008 (Fix false positive double negations with macro invocation)
 - #144010 (Boostrap: add warning on `optimize = false`)
 - #144049 (rustc-dev-guide subtree update)
 - #144056 (Copy GCC sources into the build directory even outside CI)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3023a28 into rust-lang:master Jul 18, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 18, 2025
rust-timer added a commit that referenced this pull request Jul 18, 2025
Rollup merge of #144010 - xdoardo:bootstrap-warning-optimize-false, r=clubby789

Boostrap: add warning on `optimize = false`

I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used.

I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants