Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set target_vendor = "openwrt" on mips64-openwrt-linux-musl #137836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Mar 1, 2025

OpenWRT is a Linux distribution for embedded network devices. The target name contains openwrt, so we should set cfg(target_vendor = "openwrt").

This is similar to what other Linux distributions do (the only one in-tree is x86_64-unikraft-linux-musl, but that sets target_vendor = "unikraft").

Motivation: To make correctly parsing target names simpler.

Fixes #131165.

CC target maintainer @Itus-Shield

On mips64-openwrt-linux-musl target.
@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2025

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

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.

Seems reasonable to me, thanks. r=me if the target maintainer agrees.

@jieyouxu
Copy link
Member

jieyouxu commented Mar 1, 2025

r? jieyouxu
@bors delegate+ rollup

@bors
Copy link
Contributor

bors commented Mar 1, 2025

✌️ @madsmtm, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@jieyouxu jieyouxu added the A-targets Area: Concerning the implications of different compiler targets label Mar 3, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 3, 2025

I'm going to approve this because I find this more "accurate" than

target_arch="mips64"
target_vendor="unknown"
target_os="linux"
target_env="musl"

where one can't distinguish between this target vs other mips64 linux-musl targets. If the target maintainer disagrees or have a better proposal, a follow-up PR is welcomed and feel free to roll me as the reviewer.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 3, 2025

📌 Commit c4d6426 has been approved by 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 Mar 3, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 4, 2025
…ieyouxu

Set `target_vendor = "openwrt"` on `mips64-openwrt-linux-musl`

OpenWRT is a Linux distribution for embedded network devices. The target name contains `openwrt`, so we should set `cfg(target_vendor = "openwrt")`.

This is similar to what other Linux distributions do (the only one in-tree is `x86_64-unikraft-linux-musl`, but that sets `target_vendor = "unikraft"`).

Motivation: To make correctly [parsing target names](rust-lang/cc-rs#1413) simpler.

Fixes rust-lang#131165.

CC target maintainer `@Itus-Shield`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2025
Rollup of 13 pull requests

Successful merges:

 - rust-lang#136581 (Retire the legacy `Makefile`-based `run-make` test infra)
 - rust-lang#136865 (Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes)
 - rust-lang#137147 (Add exclude to config.toml)
 - rust-lang#137327 (Undeprecate env::home_dir)
 - rust-lang#137463 ([illumos] attempt to use posix_spawn to spawn processes)
 - rust-lang#137477 (uefi: Add Service Binding Protocol abstraction)
 - rust-lang#137502 (Don't include global asm in `mir_keys`, fix error body synthesis)
 - rust-lang#137534 ([rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden))
 - rust-lang#137565 (Try to point of macro expansion from resolver and method errors if it involves macro var)
 - rust-lang#137643 (Add DWARF test case for non-C-like `repr128` enums)
 - rust-lang#137722 (`librustdoc`: 2024 edition! 🎊)
 - rust-lang#137836 (Set `target_vendor = "openwrt"` on `mips64-openwrt-linux-musl`)
 - rust-lang#137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK)

Failed merges:

 - rust-lang#137798 (ci: use ubuntu 24 on arm large runner)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Mar 4, 2025
…ieyouxu

Set `target_vendor = "openwrt"` on `mips64-openwrt-linux-musl`

OpenWRT is a Linux distribution for embedded network devices. The target name contains `openwrt`, so we should set `cfg(target_vendor = "openwrt")`.

This is similar to what other Linux distributions do (the only one in-tree is `x86_64-unikraft-linux-musl`, but that sets `target_vendor = "unikraft"`).

Motivation: To make correctly [parsing target names](rust-lang/cc-rs#1413) simpler.

Fixes rust-lang#131165.

CC target maintainer ``@Itus-Shield``
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135695 (Support raw-dylib link kind on ELF)
 - rust-lang#137836 (Set `target_vendor = "openwrt"` on `mips64-openwrt-linux-musl`)
 - rust-lang#137913 (Allow struct field default values to reference struct's generics)
 - rust-lang#137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK)
 - rust-lang#137963 (Add ``dyn`` keyword to `E0373` examples)
 - rust-lang#137975 (Remove unused `PpMode::needs_hir`)

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

jieyouxu commented Mar 4, 2025

Actually, there's no need to rush this, let's wait to hear back from target maintainer.
@bors r-

@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 Mar 4, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 4, 2025

cc @Itus-Shield

@jieyouxu jieyouxu 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 Mar 4, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 9, 2025

Please ping me (and mark this as unblocked) on or after ~2025-03-17 if we don't hear back from target maintainer by then.
@rustbot blocked (waiting to hear back from target maintainer)

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 9, 2025
@rustbot rustbot added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-targets Area: Concerning the implications of different compiler targets S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

The target information for mips64-openwrt-linux-musl seems wrong
5 participants