rust/compiler/rustc_interface/src
bors a8207df49e Auto merge of #105812 - ojeda:no-jump-tables, r=nikic
Add `-Zno-jump-tables`

This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes the codegen backend avoid generating jump tables when lowering switches.

In the case of LLVM, the `"no-jump-tables"="true"` function attribute is added to every function.

The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch).

[1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables
[2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables
[3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83
2022-12-21 17:38:38 +00:00
..
callbacks.rs typo 2022-05-23 22:51:34 +02:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
interface.rs Rename NestedMetaItem::[Ll]iteral as NestedMetaItem::[Ll]it. 2022-11-28 15:18:53 +11:00
lib.rs Fix rustdoc --version when used with download-rustc 2022-11-09 02:54:51 -06:00
passes.rs Fold Definitions into the untracked data 2022-12-09 14:59:39 +00:00
proc_macro_decls.rs Simplify code 2022-11-05 17:54:06 +01:00
queries.rs don't clone Copy types 2022-12-18 14:25:55 +01:00
tests.rs Add -Zno-jump-tables 2022-12-20 21:42:54 +01:00
util.rs Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00