Currently:
-Ctarget-feature="+retpoline-external-thunk"
-Ctarget-feature="+retpoline-indirect-branches"
-Ctarget-feature="+retpoline-indirect-calls"
seems to work as expected, but the features are unknown, and so since 1.61 they emit a warning:
warning: unknown feature specified for `-Ctarget-feature`: `retpoline-external-thunk`
|
= note: it is still passed through to the codegen backend
= help: consider filing a feature request
warning: unknown feature specified for `-Ctarget-feature`: `retpoline-indirect-branches`
|
= note: it is still passed through to the codegen backend
= help: consider filing a feature request
warning: unknown feature specified for `-Ctarget-feature`: `retpoline-indirect-calls`
|
= note: it is still passed through to the codegen backend
= help: consider filing a feature request
Could/should these be added as known features to avoid using the target specification file?
In an old issue at #54637 it seems that back then dedicated flags were not intended (like Clang's -mretpoline-external-thunk and GCC's -mindirect-branch=thunk-extern -mindirect-branch-register), which perhaps make a bit more sense.
PR: #135927 (1.89).
PR: #140740 (1.91).
MCP: rust-lang/compiler-team#868 (-Zretpoline and -Zretpoline-external-thunk).
MCP: rust-lang/compiler-team#899 (-Zindirect-branch-cs-prefix).
Currently:
seems to work as expected, but the features are unknown, and so since 1.61 they emit a warning:
Could/should these be added as known features to avoid using the target specification file?
In an old issue at #54637 it seems that back then dedicated flags were not intended (like Clang's
-mretpoline-external-thunkand GCC's-mindirect-branch=thunk-extern -mindirect-branch-register), which perhaps make a bit more sense.PR: #135927 (1.89).
PR: #140740 (1.91).
MCP: rust-lang/compiler-team#868 (
-Zretpolineand-Zretpoline-external-thunk).MCP: rust-lang/compiler-team#899 (
-Zindirect-branch-cs-prefix).