Skip to content

add cfg(target_object_format = "...") - #155126

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
folkertdev:target-object-format
Apr 12, 2026
Merged

add cfg(target_object_format = "...")#155126
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
folkertdev:target-object-format

Conversation

@folkertdev

@folkertdevfolkertdev commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

tracking issue: #152586

I'm implementing the predicate as target_object_format, because that's what is useful to me (for testing #[link_section = "..."] where mach-o has some extra restrictions) and maps cleanly to the BinaryFormat enum that is used internally. There is still room for a future target_executable_format when there is a use case.

cc @joshtriplett as the lang sponsor of this feature, @workingjubilee as the author of the proposal.

r? JonathanBrouwer a sidequest from the sidequest that is #155065

@rustbotrustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 10, 2026
@rust-log-analyzer

This comment has been minimized.

@folkertdev
folkertdevforce-pushed the target-object-format branch 2 times, most recently from 5b32d9f to 2212a27CompareApril 10, 2026 21:13
@folkertdev
folkertdev marked this pull request as ready for review April 10, 2026 21:14
@rustbot

Copy link
Copy Markdown
Collaborator

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

Some changes occurred in cfg and check-cfg configuration

cc @Urgau

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

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 10, 2026
Comment threadcompiler/rustc_session/src/config/cfg.rs Outdated
Comment threadcompiler/rustc_feature/src/unstable.rs Outdated
Comment threadcompiler/rustc_session/src/config/cfg.rs
@UrgauUrgau self-assigned this Apr 10, 2026
@rust-log-analyzer

This comment has been minimized.

@folkertdev
folkertdevforce-pushed the target-object-format branch 3 times, most recently from 560902f to 36c6115CompareApril 10, 2026 23:36
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

Comment threadcompiler/rustc_target/src/json.rs Outdated
@folkertdev
folkertdevforce-pushed the target-object-format branch from 36c6115 to 332a55cCompareApril 11, 2026 09:50
@rust-log-analyzer

This comment has been minimized.

@folkertdev
folkertdevforce-pushed the target-object-format branch from 332a55c to 171dea8CompareApril 11, 2026 10:47
@rust-log-analyzer

This comment has been minimized.

@folkertdev
folkertdevforce-pushed the target-object-format branch from 171dea8 to 6bcd172CompareApril 11, 2026 12:12
@folkertdev

Copy link
Copy Markdown
ContributorAuthor

Finally made it through CI

@UrgauUrgau left a comment

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.

LGTM, r=me (unless you want to wait for @JonathanBrouwer)

View changes since this review

@folkertdev

Copy link
Copy Markdown
ContributorAuthor

@bors r=Urgau

@rust-bors

rust-borsBot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6bcd172 has been approved by Urgau

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Apr 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 11, 2026
…=Urgau
add `cfg(target_object_format = "...")`
tracking issue: rust-lang#152586
I'm implementing the predicate as `target_object_format`, because that's what is useful to me (for testing `#[link_section = "..."]` where `mach-o` has some extra restrictions) and maps cleanly to the `BinaryFormat` enum that is used internally. There is still room for a future `target_executable_format` when there is a use case.
cc @joshtriplett as the lang sponsor of this feature, @workingjubilee as the author of the proposal.
r? JonathanBrouwer a sidequest from the sidequest that is rust-lang#155065
rust-borsBot pushed a commit that referenced this pull request Apr 11, 2026
…uwer
Rollup of 3 pull requests
Successful merges:
- #154491 (Extend `core::char`'s documentation of casing issues)
- #155126 (add `cfg(target_object_format = "...")`)
- #153871 (fix spurious test failure in `metadata_access_times`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 11, 2026
…=Urgau
add `cfg(target_object_format = "...")`
tracking issue: rust-lang#152586
I'm implementing the predicate as `target_object_format`, because that's what is useful to me (for testing `#[link_section = "..."]` where `mach-o` has some extra restrictions) and maps cleanly to the `BinaryFormat` enum that is used internally. There is still room for a future `target_executable_format` when there is a use case.
cc @joshtriplett as the lang sponsor of this feature, @workingjubilee as the author of the proposal.
r? JonathanBrouwer a sidequest from the sidequest that is rust-lang#155065
@jhprattjhpratt mentioned this pull request Apr 12, 2026
rust-borsBot pushed a commit that referenced this pull request Apr 12, 2026
Rollup of 7 pull requests
Successful merges:
- #155084 (Initial functions to start on transmute v2)
- #155126 (add `cfg(target_object_format = "...")`)
- #155165 (Portable SIMD subtree update)
- #153871 (fix spurious test failure in `metadata_access_times`)
- #155150 (replace <name> @ ty::AliasTy matches with just using args: <name>_args)
- #155159 (Fix min-specialization ICE from ignored region resolution failure)
- #155167 (Reduce size of `ImportData`)
@rust-bors
rust-borsBot merged commit 1700a21 into rust-lang:mainApr 12, 2026
11 checks passed
@rustbotrustbot added this to the 1.97.0 milestone Apr 12, 2026
rust-timer added a commit that referenced this pull request Apr 12, 2026
Rollup merge of #155126 - folkertdev:target-object-format, r=Urgau
add `cfg(target_object_format = "...")`
tracking issue: #152586
I'm implementing the predicate as `target_object_format`, because that's what is useful to me (for testing `#[link_section = "..."]` where `mach-o` has some extra restrictions) and maps cleanly to the `BinaryFormat` enum that is used internally. There is still room for a future `target_executable_format` when there is a use case.
cc @joshtriplett as the lang sponsor of this feature, @workingjubilee as the author of the proposal.
r? JonathanBrouwer a sidequest from the sidequest that is #155065
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicoreArea: `minicore` test auxiliary and `//@ add-core-stubs`S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@folkertdev@rust-log-analyzer@rustbot@Urgau@JonathanBrouwer