Skip to content

retpoline and retpoline-external-thunk flags (target modifiers) to enable retpoline-related target features #135927

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

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

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented Jan 23, 2025

-Zretpoline and -Zretpoline-external-thunk flags are target modifiers (tracked to be equal in linked crates).

  • Enables target features for -Zretpoline-external-thunk:
    +retpoline-external-thunk, +retpoline-indirect-branches, +retpoline-indirect-calls.
  • Enables target features for -Zretpoline:
    +retpoline-indirect-branches, +retpoline-indirect-calls.

It corresponds to clang -mretpoline & -mretpoline-external-thunk flags.

Also this PR forbids to specify those target features manually (warning).

@rustbot
Copy link
Collaborator

rustbot commented Jan 23, 2025

r? @compiler-errors

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

rustbot commented Jan 23, 2025

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

r? compiler

@bors
Copy link
Collaborator

bors commented Jan 26, 2025

☔ The latest upstream changes (presumably #136085) made this pull request unmergeable. Please resolve the merge conflicts.

@azhogin azhogin marked this pull request as draft January 30, 2025 08:48
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@chenyukang
Copy link
Member

r? compiler

@rustbot rustbot assigned fee1-dead and unassigned chenyukang Feb 5, 2025
@rust-log-analyzer

This comment has been minimized.

@fee1-dead
Copy link
Member

r? compiler

@rustbot rustbot assigned lcnr and unassigned fee1-dead Feb 8, 2025
@lcnr
Copy link
Contributor

lcnr commented Feb 9, 2025

r? @davidtwco maybe 😅

@rustbot rustbot added A-rust-for-linux Relevant for the Rust-for-Linux project F-target_modifiers `#![feature(target_modifiers)]` labels Apr 16, 2025
@Darksonn
Copy link
Contributor

I filed an MCP: rust-lang/compiler-team#868

@jieyouxu jieyouxu added the S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. label Apr 28, 2025
@ojeda
Copy link
Contributor

ojeda commented May 7, 2025

@azhogin If you would like to pick up here the commits from the -Zindirect-branch-cs-prefix one, please feel free to do so: #140740 (as far as I can tell, it should be clean when this one is clean).

@davidtwco confirmed it sounded OK to reuse the MCP for -Zretpoline* for -Zindirect-branch-cs-prefix too.

@azhogin azhogin force-pushed the azhogin/retpoline branch from 597eb26 to d70fbca Compare May 10, 2025 18:38
@rustbot rustbot added the A-rustdoc-json Area: Rustdoc JSON backend label May 10, 2025
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/retpoline branch from d70fbca to b6ecdc1 Compare May 10, 2025 19:51
@rust-log-analyzer

This comment has been minimized.

@traviscross
Copy link
Contributor

@rustbot labels -S-waiting-on-MCP

Looks like we're no longer waiting on the MCP here:

rust-lang/compiler-team#868

@rustbot rustbot removed the S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. label May 21, 2025
@traviscross
Copy link
Contributor

@azhogin: Are you ready for this to be reviewed? If so, mark it with @rustbot ready.

@bors

This comment was marked as resolved.

@azhogin azhogin force-pushed the azhogin/retpoline branch from 203cb50 to 8d6ef02 Compare May 25, 2025 12:23
@azhogin azhogin force-pushed the azhogin/retpoline branch from 8d6ef02 to 0321253 Compare June 8, 2025 19:31
@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Jun 8, 2025
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/retpoline branch from 0321253 to 99ece33 Compare June 8, 2025 19:50
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/retpoline branch from 99ece33 to 14f651e Compare June 8, 2025 20:36
@azhogin
Copy link
Contributor Author

azhogin commented Jun 8, 2025

@rustbot ready

@rustbot rustbot 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 Jun 8, 2025
@bors
Copy link
Collaborator

bors commented Jun 9, 2025

☔ The latest upstream changes (presumably #142220) made this pull request unmergeable. Please resolve the merge conflicts.

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. A-rust-for-linux Relevant for the Rust-for-Linux project A-rustdoc-json Area: Rustdoc JSON backend F-target_modifiers `#![feature(target_modifiers)]` 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. T-rustdoc Relevant 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.