Skip to content

Conversation

@davidtwco
Copy link
Member

Per rust-lang/compiler-team#944:

Per #71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).

Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.

De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.

@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2025

r? @JonathanBrouwer

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

@Kivooeo
Copy link
Member

Kivooeo commented Dec 19, 2025

r? me

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 19, 2025

📌 Commit 6c4c438 has been approved by Kivooeo

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 Dec 19, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2025
…json, r=Kivooeo

Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per rust-lang#71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2025
…json, r=Kivooeo

Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per rust-lang#71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
bors added a commit that referenced this pull request Dec 19, 2025
Rollup of 7 pull requests

Successful merges:

 - #149633 (Enable `outline-atomics` by default on AArch64 FreeBSD)
 - #149788 (Move shared offload globals and define per-kernel globals once)
 - #149989 (Improve filenames encoding and misc)
 - #150012 (rustc_target: Add `efiapi` ABI support for LoongArch)
 - #150116 (layout: Store inverse memory index in `FieldsShape::Arbitrary`)
 - #150151 (Destabilise `target-spec-json`)
 - #150159 (Split eii macro expansion code)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#150168 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 19, 2025
@Kivooeo
Copy link
Member

Kivooeo commented Dec 19, 2025

I don't see why exactly it fails, but the problem in src/tools/cargo/tests/testsuite/rustc.rs in rustc_with_print_cfg_config_toml_env test

@Mark-Simulacrum Mark-Simulacrum added the relnotes Marks issues that should be documented in the release notes of the next release. label Dec 20, 2025
davidtwco added a commit to davidtwco/cargo that referenced this pull request Jan 5, 2026
rustc is destabilising custom targets (rust-lang/rust#150151) and
requiring that `-Zunstable-options` is passed when custom targets are
used. This is the minimum change required so that the rustc patch can be
merged.
@davidtwco
Copy link
Member Author

Submitted rust-lang/cargo#16467 to adjust the Cargo test, then after the Cargo submodule update this will be able to be merged.

@davidtwco davidtwco added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 5, 2026
davidtwco added a commit to davidtwco/cargo that referenced this pull request Jan 5, 2026
rustc is destabilising custom targets (rust-lang/rust#150151) and
requiring that `-Zunstable-options` is passed when custom targets are
used. This is the minimum change required so that the rustc patch can be
merged.
davidtwco added a commit to davidtwco/cargo that referenced this pull request Jan 5, 2026
rustc is destabilising custom targets (rust-lang/rust#150151) and
requiring that `-Zunstable-options` is passed when custom targets are
used. This is the minimum change required so that the rustc patch can be
merged.
davidtwco added a commit to davidtwco/cargo that referenced this pull request Jan 6, 2026
rustc is destabilising custom targets (rust-lang/rust#150151) and
requiring that `-Zunstable-options` is passed when custom targets are
used. This is the minimum change required so that the rustc patch can be
merged.
github-merge-queue bot pushed a commit to rust-lang/cargo that referenced this pull request Jan 6, 2026
rustc is destabilising custom targets (rust-lang/rust#150151) by
requiring that `-Zunstable-options` is passed when custom targets are
used. This patch is the minimum change required so that the rustc patch
can be merged without failing the Cargo tests run in rustc's CI.
@davidtwco davidtwco added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jan 12, 2026
@davidtwco
Copy link
Member Author

I believe the Cargo submodule was updated in #150932 so this can be retried.

@bors r=Kivooeo rollup- (no rollup just in case there are additional issues)

@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 Jan 12, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 12, 2026

📌 Commit 6c4c438 has been approved by Kivooeo

It is now in the queue for this repository.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 12, 2026
…vooeo

Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per rust-lang#71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
rust-bors bot pushed a commit that referenced this pull request Jan 12, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #145343 (Dogfood `-Zno-embed-metadata` in the standard library)
 - #150151 (Destabilise `target-spec-json`)
 - #150723 (std: move `errno` and related functions into `sys::io`)
 - #150771 (Remove legacy homu `try` and `auto` branch mentions)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)

r? @ghost
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 12, 2026
…vooeo

Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per rust-lang#71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
rust-bors bot pushed a commit that referenced this pull request Jan 13, 2026
Rollup of 12 pull requests

Successful merges:

 - #145343 (Dogfood `-Zno-embed-metadata` in the standard library)
 - #150151 (Destabilise `target-spec-json`)
 - #150723 (std: move `errno` and related functions into `sys::io`)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)

r? @ghost
rust-bors bot pushed a commit that referenced this pull request Jan 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #150151 (Destabilise `target-spec-json`)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150883 (Improve span for "unresolved intra doc link" on `deprecated` attribute)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)
 - #151029 (rustc-dev-guide subtree update)
 - #151032 (fix: added missing backtick in triagebot.toml)
 - #151035 (Don't suggest replacing closure parameter with type name)

r? @ghost
@rust-bors rust-bors bot merged commit a89683d into rust-lang:main Jan 13, 2026
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 13, 2026
rust-timer added a commit that referenced this pull request Jan 13, 2026
Rollup merge of #150151 - destabilise-target-spec-json, r=Kivooeo

Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per #71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (rust-lang/rfcs#3873, rust-lang/rfcs#3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
@davidtwco davidtwco deleted the destabilise-target-spec-json branch January 14, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants