Skip to content

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 9, 2025

The context for this issue is in #145107. The issue is that if people configure build-dir, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:

[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true

into <rustc-checkout>/.cargo/config.toml. x build works with this PR, doesn't work without this PR.

Fixes: #145107

@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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 Aug 9, 2025
Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Whew

@jieyouxu
Copy link
Member

jieyouxu commented Aug 9, 2025

Thanks!
@bors r=lqd,jieyouxu rollup

@bors
Copy link
Collaborator

bors commented Aug 9, 2025

📌 Commit a5ddf5d has been approved by lqd,jieyouxu

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 Aug 9, 2025
@jieyouxu jieyouxu assigned lqd and jieyouxu and unassigned Mark-Simulacrum Aug 9, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 9, 2025
…ouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in rust-lang#145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: rust-lang#145107
bors added a commit that referenced this pull request Aug 9, 2025
Rollup of 8 pull requests

Successful merges:

 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145146 (remove `P`)
 - #145152 (Use `to_ascii_lowercase` to avoid heap alloc in `detect_confuse_type`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])

Failed merges:

 - #145145 (some `derive_more` refactors)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…ouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in rust-lang#145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: rust-lang#145107
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…ouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in rust-lang#145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: rust-lang#145107
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…ouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in rust-lang#145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: rust-lang#145107
bors added a commit that referenced this pull request Aug 10, 2025
Rollup of 19 pull requests

Successful merges:

 - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
 - #143093 (Simplify polonius location-sensitive analysis)
 - #144402 (Stabilize loongarch32 inline asm)
 - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
 - #144544 (Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies)
 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
 - #145130 (improve "Documentation problem" issue template.)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145145 (some `derive_more` refactors)
 - #145147 (rename `TraitRef::from_method` to `from_assoc`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])
 - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
 - #145175 (Enable limit_rdylib_exports on Solaris)
 - #145187 (Fix an unstable feature comment that wasn't a doc comment)
 - #145191 (`suggest_borrow_generic_arg`: use the correct generic args)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…ouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in rust-lang#145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: rust-lang#145107
bors added a commit that referenced this pull request Aug 10, 2025
Rollup of 18 pull requests

Successful merges:

 - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
 - #143093 (Simplify polonius location-sensitive analysis)
 - #144402 (Stabilize loongarch32 inline asm)
 - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
 - #145130 (improve "Documentation problem" issue template.)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145145 (some `derive_more` refactors)
 - #145147 (rename `TraitRef::from_method` to `from_assoc`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])
 - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
 - #145175 (Enable limit_rdylib_exports on Solaris)
 - #145187 (Fix an unstable feature comment that wasn't a doc comment)
 - #145191 (`suggest_borrow_generic_arg`: use the correct generic args)

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

Successful merges:

 - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
 - #143093 (Simplify polonius location-sensitive analysis)
 - #144402 (Stabilize loongarch32 inline asm)
 - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
 - #145130 (improve "Documentation problem" issue template.)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145145 (some `derive_more` refactors)
 - #145147 (rename `TraitRef::from_method` to `from_assoc`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])
 - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
 - #145187 (Fix an unstable feature comment that wasn't a doc comment)
 - #145191 (`suggest_borrow_generic_arg`: use the correct generic args)

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

Successful merges:

 - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
 - #143093 (Simplify polonius location-sensitive analysis)
 - #144402 (Stabilize loongarch32 inline asm)
 - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
 - #145130 (improve "Documentation problem" issue template.)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145145 (some `derive_more` refactors)
 - #145147 (rename `TraitRef::from_method` to `from_assoc`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])
 - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
 - #145187 (Fix an unstable feature comment that wasn't a doc comment)
 - #145191 (`suggest_borrow_generic_arg`: use the correct generic args)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 53eab6b into rust-lang:master Aug 10, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 10, 2025
rust-timer added a commit that referenced this pull request Aug 10, 2025
Rollup merge of #145156 - Kobzol:cargo-build-dir, r=lqd,jieyouxu

Override custom Cargo `build-dir` in bootstrap

The context for this issue is in #145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: #145107
@Kobzol Kobzol deleted the cargo-build-dir branch August 10, 2025 17:47
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.

cargo build-dir incompatibility: no output generated for "lib…" "rmeta"
6 participants