Skip to content

Simplified build script bin names in new layout#16812

Merged
epage merged 2 commits intorust-lang:masterfrom
ranger-ross:dont-uplift-build-scripts
Mar 31, 2026
Merged

Simplified build script bin names in new layout#16812
epage merged 2 commits intorust-lang:masterfrom
ranger-ross:dont-uplift-build-scripts

Conversation

@ranger-ross
Copy link
Copy Markdown
Member

What does this PR try to resolve?

This PR spawned out of a comment from @epage raising that we didn't remove the hashes for some bins. However we did remove the hashes from "regular" bins in #16351

This PR

  • Removes the use of -Cextra-filename for build scripts when -Zbuild-dir-new-layout is enabled.
  • Does not uplift build-scripts in the build-dir internally. (its not really uplifting, its more of a rename via hardlink)

Previously, we had a directory like

build/<pkg>/<hash>/out/
    build_script_build-[HASH].d
    build_script_build-[HASH][EXE]
    build-script-build[EXE]

After this change

build/<pkg>/<hash>/out/
    build_script_build.d
    build_script_build[EXE]

Part of: #15010

How to test and review this PR?

See the test updates in each commit.
I could split into 2 PRs if needed but I felt the changes were related and small enough to go together.

@rustbot rustbot added A-build-scripts Area: build.rs scripts A-layout Area: target output directory layout, naming, and organization S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 31, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 31, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
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: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@ranger-ross ranger-ross mentioned this pull request Mar 31, 2026
2 tasks
Copy link
Copy Markdown
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

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

While are have paused further refinements, that is mostly so people can update their code that relies on the internals. The chance of running into that here is low so we should be good.

View changes since this review

@epage epage enabled auto-merge March 31, 2026 18:59
@epage epage added this pull request to the merge queue Mar 31, 2026
Merged via the queue into rust-lang:master with commit d3b82ea Mar 31, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 31, 2026
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 2, 2026
Update cargo submodule

12 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..0c7d80bf5ad3b873a5dbf44e0185152890c6d18a
2026-03-30 16:59:25 +0000 to 2026-04-02 20:48:06 +0000
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)

r? ghost
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 3, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 4, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 4, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-scripts Area: build.rs scripts A-layout Area: target output directory layout, naming, and organization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants