Skip to content

Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata#159781

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dpaoliello:noembed
Jul 24, 2026
Merged

Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata#159781
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dpaoliello:noembed

Conversation

@dpaoliello

Copy link
Copy Markdown
Contributor

The recent Cargo submodule update picked up rust-lang/cargo#17149

However, bootstrap was still using the old name, resulting in:

Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.

@rustbot

rustbot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

@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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 23, 2026
@rustbot

rustbot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 74 candidates
  • Random selection from 20 candidates

@rust-log-analyzer

This comment has been minimized.

@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

Ah, this is annoying. On stage0/beta Cargo, the old flag is still used, while if we use the in-tree stage1+ Cargo, we have to use the new flag.

@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

Maybe we can just temporarily stop using this flag, although I'm not sure whether bootstrap can deal with both the flag being on and off.

@bjorn3

bjorn3 commented Jul 23, 2026

Copy link
Copy Markdown
Member

We can check for the local-rebuild config, right? If that is set, the new cli flag should be used, otherwise the old cli flag.

@rust-log-analyzer

This comment has been minimized.

Comment thread src/bootstrap/src/core/builder/cargo.rs Outdated
if matches!(mode, Mode::Std) {
cargo.arg("-Zembed-metadata=no");
// The `-Zembed-metadata` flag was renamed from `-Zno-embed-metadata`.
if build_compiler_stage == 0 {

@bjorn3 bjorn3 Jul 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same cargo is used for all stages, so checking build_compiler_stage is not correct. local-rebuild should work though. That is what is used to indicate that the bootstrap toolchain (and thus cargo) matches the in-tree one (or is at most a patch release away)

View changes since the review

…adata

The recent Cargo submodule update picked up <rust-lang/cargo#17149>

However, bootstrap was still using the old name, resulting in:

```
Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata
```

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.
@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

Thank you! Let's try.

@bors r+ rollup=iffy

@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fe37a8a has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 23, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 23, 2026
Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata

The recent Cargo submodule update picked up <rust-lang/cargo#17149>

However, bootstrap was still using the old name, resulting in:

```
Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata
```

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 24, 2026
Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata

The recent Cargo submodule update picked up <rust-lang/cargo#17149>

However, bootstrap was still using the old name, resulting in:

```
Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata
```

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.
@dpaoliello

Copy link
Copy Markdown
Contributor Author

Just validated that this change fixes our internal pipeline as well!

jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 24, 2026
Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata

The recent Cargo submodule update picked up <rust-lang/cargo#17149>

However, bootstrap was still using the old name, resulting in:

```
Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata
```

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.
rust-bors Bot pushed a commit that referenced this pull request Jul 24, 2026
Rollup of 12 pull requests

Successful merges:

 - #159765 (Avoid spurious rebuilds of JSON docs in bootstrap)
 - #159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata)
 - #158362 (trait solver: account for universes from replace_bound_vars)
 - #159173 (Add allowed list check on EII implementations attributes)
 - #159718 (Make `DocLinkResMap` an `FxIndexMap`)
 - #159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature)
 - #155795 (constify `vec![1, 2, 3]` macro)
 - #157776 (ci: Enable autodiff tests on x86_64 linux)
 - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools)
 - #159271 (str: add ASCII fast path to word_to_titlecase)
 - #159666 (fix(ld64.lld): route version mismatch warnings to linker_info on macOS)
 - #159667 (Make some parser structured suggestions verbose and tweak their wording)
rust-bors Bot pushed a commit that referenced this pull request Jul 24, 2026
Rollup of 14 pull requests

Successful merges:

 - #159765 (Avoid spurious rebuilds of JSON docs in bootstrap)
 - #159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata)
 - #158362 (trait solver: account for universes from replace_bound_vars)
 - #158372 (rustfmt: Discover modules via `cfg_select!`)
 - #159173 (Add allowed list check on EII implementations attributes)
 - #159718 (Make `DocLinkResMap` an `FxIndexMap`)
 - #159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature)
 - #159731 (std: Implement futex on wasip3 targets, update target spec)
 - #159755 (Improve consistency of attribute error messages)
 - #155795 (constify `vec![1, 2, 3]` macro)
 - #157776 (ci: Enable autodiff tests on x86_64 linux)
 - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools)
 - #159271 (str: add ASCII fast path to word_to_titlecase)
 - #159667 (Make some parser structured suggestions verbose and tweak their wording)
@rust-bors
rust-bors Bot merged commit 5e46148 into rust-lang:main Jul 24, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 24, 2026
rust-timer added a commit that referenced this pull request Jul 24, 2026
Rollup merge of #159781 - dpaoliello:noembed, r=Kobzol

Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata

The recent Cargo submodule update picked up <rust-lang/cargo#17149>

However, bootstrap was still using the old name, resulting in:

```
Building stage1 library artifacts (stage1 -> stage1, arm64ec-pc-windows-msvc)
error: unknown `-Z` flag specified: no-embed-metadata
```

Fix is to switch to the rename.

I also removed the diff in the Cranelift setup script, since they must have already hit this issue and no longer need the workaround.
@dpaoliello
dpaoliello deleted the noembed branch July 24, 2026 17:07
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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants