You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #116892 - ojeda:rethunk, r=wesleywiser
Add `-Zfunction-return={keep,thunk-extern}` option
This is intended to be used for Linux kernel RETHUNK builds.
With this commit (optionally backported to Rust 1.73.0), plus a patched Linux kernel to pass the flag, I get a RETHUNK build with Rust enabled that is `objtool`-warning-free and is able to boot in QEMU and load a sample Rust kernel module.
Issue: #116853.
Copy file name to clipboardExpand all lines: compiler/rustc_session/src/options.rs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -430,6 +430,7 @@ mod desc {
430
430
pubconst parse_inlining_threshold:&str =
431
431
"either a boolean (`yes`, `no`, `on`, `off`, etc), or a non-negative number";
432
432
pubconst parse_llvm_module_flag:&str = "<key>:<type>:<value>:<behavior>. Type must currently be `u32`. Behavior should be one of (`error`, `warning`, `require`, `override`, `append`, `appendunique`, `max`, `min`)";
433
+
pubconst parse_function_return:&str = "`keep` or `thunk-extern`";
0 commit comments