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

Fix RISC-V VxWorks LLVM target triples #138427

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Mar 12, 2025

The targets riscv32-wrs-vxworks and riscv64-wrs-vxworks uses the plain $ARCH LLVM triple, which LLVM normalizes to $ARCH-unknown-unknown, we should use $ARCH-unknown-linux-gnu$ABI which is consistent with the the other VxWorks targets.

Motivation: To make it easier to verify that cc-rs' conversion from rustc to Clang/LLVM triples is correct.

Alternative: Pass $ARCH-unknown-none in the other VxWorks LLVM triples, I don't know anything about VxWorks, so am unsure which is the most correct option.

CC target maintainer @biabbas.
r? jieyouxu

The targets used the plain `$ARCH` triple, which LLVM normalizes to
`$ARCH-unknown-unknown`, which is inconsistent with the the other
VxWorks targets which all use `$ARCH-unknown-linux-gnu$ABI`.
@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 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2025

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

@jieyouxu
Copy link
Member

Same here, r=me if the target maintainer is on board with the change.
@bors delegate+ rollup

@bors
Copy link
Contributor

bors commented Mar 12, 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
Copy link
Member

@rustbot blocked (waiting to hear back from target maintainers, not much for me or PR author to do)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2025
@biabbas
Copy link
Contributor

biabbas commented Mar 13, 2025

The target triple passed to compilers in vxworks is riscv32 and riscv64, but with numerous flags. I'll test the changes and let you know if unknown linux gnu target is compatible for these targets.

Copy link
Contributor

@biabbas biabbas left a comment

Choose a reason for hiding this comment

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

Thanks.

@madsmtm
Copy link
Contributor Author

madsmtm commented Mar 13, 2025

Cool!

@rustbot ready
@bors r=@jieyouxu

@bors
Copy link
Contributor

bors commented Mar 13, 2025

📌 Commit 0434013 has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot 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 Mar 13, 2025
@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 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#138126 (Add an opt-out in pretty printing for RTN rendering)
 - rust-lang#138399 (Delegation: allow foreign fns `reuse`)
 - rust-lang#138406 (Update mdbook to 0.4.47)
 - rust-lang#138417 (minor interpreter cleanups)
 - rust-lang#138420 (Adapt to LLVM dropping CfiFunctionIndex::begin()/end())
 - rust-lang#138423 (Don't emit error within cast function, propagate it as a `CastError`)
 - rust-lang#138425 (Remove `feature = "hash_raw_entry"`)
 - rust-lang#138427 (Fix RISC-V VxWorks LLVM target triples)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Rollup merge of rust-lang#138427 - madsmtm:vxworks-llvm-target, r=jieyouxu

Fix RISC-V VxWorks LLVM target triples

The targets `riscv32-wrs-vxworks` and `riscv64-wrs-vxworks` uses the plain `$ARCH` LLVM triple, which LLVM normalizes to `$ARCH-unknown-unknown`, we should use `$ARCH-unknown-linux-gnu$ABI` which is consistent with the the other VxWorks targets.

Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](rust-lang/cc-rs#1431) is correct.

Alternative: Pass `$ARCH-unknown-none` in the other VxWorks LLVM triples, I don't know anything about VxWorks, so am unsure which is the most correct option.

CC target maintainer `@biabbas.`
r? jieyouxu
@bors bors merged commit 69b3ad1 into rust-lang:master Mar 13, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 13, 2025
@madsmtm madsmtm deleted the vxworks-llvm-target branch March 14, 2025 00:54
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-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.

None yet

5 participants