File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
compiler/rustc_codegen_gcc/src
src/doc/rustc/src/codegen-options Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ pub fn compile_codegen_unit(
126
126
for arg in & tcx. sess . opts . cg . llvm_args {
127
127
context. add_command_line_option ( arg) ;
128
128
}
129
+
130
+ if !tcx. sess . opts . cg . jump_tables {
131
+ context. add_command_line_option ( "-fno-jump-tables" ) ;
132
+ }
133
+
129
134
// NOTE: This is needed to compile the file src/intrinsic/archs.rs during a bootstrap of rustc.
130
135
context. add_command_line_option ( "-fno-var-tracking-assignments" ) ;
131
136
// NOTE: an optimization (https://github.com/rust-lang/rustc_codegen_gcc/issues/53).
Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ with coverage tools other than those built and shipped with the compiler.
211
211
212
212
## jump-tables
213
213
214
- This option is used to allow or prevent the LLVM codegen backend from creating
215
- jump tables when lowering switches.
214
+ This option is used to allow or prevent the LLVM or GCC codegen backend from
215
+ creating jump tables when lowering switches.
216
216
217
217
* ` y ` , ` yes ` , ` on ` , ` true ` or no value: allow jump tables (the default).
218
218
* ` n ` , ` no ` , ` off ` or ` false ` : disable jump tables.
You can’t perform that action at this time.
0 commit comments