Skip to content

Set target-abi module flag for LoongArch targets - #162948

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
heiher:loong-emit-target-abi
Sep 21, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
heiher:loong-emit-target-abi

Conversation

@heiher

@heiher heiher commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Like the earlier RISC-V fix (#123612), emit the "target-abi" module flag for LoongArch so that LTO correctly picks up the ABI.

This follows the recent LLVM change (llvm/llvm-project#223647) that relies on the module flag for proper TargetMachine / data-layout handling during LTO on LoongArch.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Sep 18, 2026
@rustbot

rustbot commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

r? @jackh726

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 21 candidates

@rustbot

This comment has been minimized.

@heiher
heiher force-pushed the loong-emit-target-abi branch from 2c72703 to a03cf23 Compare September 18, 2026 08:58

@nikic nikic Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment needs an update, as this is no longer RISC-V specific.

Though also the bit below this, because this is not a workaround, setting the target-abi is the correct way to communicate the ABI, and there is nothing to fix here.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@heiher
heiher force-pushed the loong-emit-target-abi branch from a03cf23 to ca8ee2f Compare September 19, 2026 08:50
@nikic

nikic commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ca8ee2f has been approved by nikic

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: babysitting some spurious failures

@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 Sep 21, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 21, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #162948 (Set target-abi module flag for LoongArch targets)
 - #162600 (Make the last non-breaking box impl generalizations)
 - #163031 (Use newer `make` version when building GCC)
 - #163054 (Use verbose suggestion for method written as function)
 - #163073 (Expand docs on `rustc_abi::Variants`)
@rust-bors
rust-bors Bot merged commit 7c0c8e0 into rust-lang:main Sep 21, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 21, 2026
Rollup merge of #162948 - heiher:loong-emit-target-abi, r=nikic

Set target-abi module flag for LoongArch targets

Like the earlier RISC-V fix (#123612), emit the "target-abi" module flag for LoongArch so that LTO correctly picks up the ABI.

This follows the recent LLVM change (llvm/llvm-project#223647) that relies on the module flag for proper TargetMachine / data-layout handling during LTO on LoongArch.
@rustbot rustbot added this to the 1.100.0 milestone Sep 21, 2026
@heiher
heiher deleted the loong-emit-target-abi branch September 22, 2026 02:38
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Sep 22, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#162948 (Set target-abi module flag for LoongArch targets)
 - rust-lang/rust#162600 (Make the last non-breaking box impl generalizations)
 - rust-lang/rust#163031 (Use newer `make` version when building GCC)
 - rust-lang/rust#163054 (Use verbose suggestion for method written as function)
 - rust-lang/rust#163073 (Expand docs on `rustc_abi::Variants`)
pull Bot pushed a commit to xtqqczze/rust-lang-rustc-dev-guide that referenced this pull request Sep 30, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#162948 (Set target-abi module flag for LoongArch targets)
 - rust-lang/rust#162600 (Make the last non-breaking box impl generalizations)
 - rust-lang/rust#163031 (Use newer `make` version when building GCC)
 - rust-lang/rust#163054 (Use verbose suggestion for method written as function)
 - rust-lang/rust#163073 (Expand docs on `rustc_abi::Variants`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

4 participants