Skip to content

rustc_target: Add OpenEmbedded/Yocto Linux base targets#157650

Open
DeepeshWR wants to merge 1 commit into
rust-lang:mainfrom
DeepeshWR:feat/yocto-targets
Open

rustc_target: Add OpenEmbedded/Yocto Linux base targets#157650
DeepeshWR wants to merge 1 commit into
rust-lang:mainfrom
DeepeshWR:feat/yocto-targets

Conversation

@DeepeshWR

@DeepeshWR DeepeshWR commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Add built-in OpenEmbedded/Yocto Linux targets for x86_64, i686, aarch64, armv7, and riscv64.

These targets inherit from the corresponding upstream Linux GNU targets and provide OpenEmbedded-specific target triples and default linker settings. They are intended to serve as base targets for downstream Yocto/OpenEmbedded-generated targets, allowing vendor-specific targets to override metadata (for example, TARGET_VENDOR) while reusing a common target configuration.

This reduces duplication in Yocto-based Rust integrations and avoids maintaining downstream copies of largely identical target specifications.

Tier 3 Policy Notes

To cover the Tier 3 requirements:

A tier 3 target must have a designated developer or developers

These targets have a designated maintainer: @DeepeshWR, as documented in the platform support documentation added by this PR.

Targets must use naming consistent with any existing targets

The targets follow the existing target naming conventions and are derived from the corresponding upstream Linux GNU targets:

x86_64-oe-linux-gnu
aarch64-oe-linux-gnu
i686-oe-linux-gnu
armv7-oe-linux-gnueabihf
riscv64-oe-linux-gnu

The oe vendor component identifies OpenEmbedded/Yocto-based systems while preserving the established architecture/OS/ABI naming scheme.

Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users

These targets do not introduce any additional legal requirements. They use the standard OpenEmbedded/Yocto cross-compilation toolchains and are intended to behave similarly to the corresponding Linux GNU targets.

Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate

These targets inherit from the corresponding Linux GNU targets and support the standard library in the same manner as their upstream counterparts.

The target must provide documentation for the Rust community explaining how to build for the target

This PR adds platform-support documentation describing the targets, maintainership, requirements, and intended usage.

Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target

The targets are thin wrappers around existing Linux GNU targets and primarily provide canonical OpenEmbedded/Yocto target triples and default linker configuration. They do not require additional CI infrastructure or special maintenance beyond keeping them aligned with their upstream Linux GNU base targets.

Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target

Noted.

Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target

These targets use LLVM through the existing Rust code generation pipeline, just like their corresponding Linux GNU targets.

r? @davidtwco

@rustbot

rustbot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

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

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@rustbot rustbot added 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 Jun 9, 2026
@Noratrieb

Copy link
Copy Markdown
Member

can you elaborate a bit more on what this is useful for?

avoids maintaining downstream copies of largely identical target specifications.

I don't understand this part, basically nothing about those targets here is copied as they seem to basically be identical.

@davidtwco

Copy link
Copy Markdown
Member

can you elaborate a bit more on what this is useful for?

avoids maintaining downstream copies of largely identical target specifications.

I don't understand this part, basically nothing about those targets here is copied as they seem to basically be identical.

There's some context here - #yocto > custom targets @ 💬

@rust-log-analyzer

This comment has been minimized.

@DeepeshWR DeepeshWR force-pushed the feat/yocto-targets branch from 502a11c to 8b216da Compare June 9, 2026 10:40
@davidtwco

Copy link
Copy Markdown
Member

Could you reply just asserting that these targets comply with our target tier policy? (e.g. like #150863)

@rust-bors

This comment has been minimized.

@DeepeshWR DeepeshWR force-pushed the feat/yocto-targets branch from 8b216da to 977fb04 Compare June 15, 2026 04:47
@rustbot

rustbot commented Jun 15, 2026

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.

@DeepeshWR

Copy link
Copy Markdown
Contributor Author

Could you reply just asserting that these targets comply with our target tier policy? (e.g. like #150863)

Thanks for pointing that out. I've updated the PR description with a "Tier 3 Policy Notes" section covering the target tier requirements.

@rust-log-analyzer

This comment has been minimized.

Add built-in OpenEmbedded/Yocto Linux targets for x86_64, i686,
aarch64, armv7, and riscv64.

These targets inherit from the corresponding upstream Linux GNU
targets and provide OpenEmbedded-specific target triples and
default linker settings. They are intended to serve as base
targets for downstream Yocto/OpenEmbedded-generated targets,
allowing vendor-specific targets to override metadata (for
example, TARGET_VENDOR) while reusing a common target
configuration.

This reduces duplication in Yocto-based Rust integrations and
avoids maintaining downstream copies of largely identical target
specifications.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
@DeepeshWR DeepeshWR force-pushed the feat/yocto-targets branch from 977fb04 to 496d43c Compare June 15, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants