File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
crates/rustc_codegen_spirv/src Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -313,9 +313,6 @@ pub struct CodegenArgs {
313313
314314 pub run_spirv_opt : bool ,
315315
316- // spirv-opt flags
317- pub preserve_bindings : bool ,
318-
319316 /// All options pertinent to `rustc_codegen_spirv::linker` specifically.
320317 //
321318 // FIXME(eddyb) should these be handled as `-C linker-args="..."` instead?
@@ -576,8 +573,6 @@ impl CodegenArgs {
576573 // FIXME(eddyb) clean up this `no-` "negation prefix" situation.
577574 let run_spirv_opt = !matches. opt_present ( "no-spirv-opt" ) ;
578575
579- let preserve_bindings = matches. opt_present ( "preserve-bindings" ) ;
580-
581576 let relax_block_layout = if relax_block_layout { Some ( true ) } else { None } ;
582577
583578 let spirv_metadata = match spirv_metadata. as_deref ( ) {
@@ -607,6 +602,7 @@ impl CodegenArgs {
607602 early_report_zombies : !matches. opt_present ( "no-early-report-zombies" ) ,
608603 infer_storage_classes : !matches. opt_present ( "no-infer-storage-classes" ) ,
609604 structurize : !matches. opt_present ( "no-structurize" ) ,
605+ preserve_bindings : matches. opt_present ( "preserve-bindings" ) ,
610606 spirt_passes : matches
611607 . opt_strs ( "spirt-passes" )
612608 . iter ( )
@@ -656,8 +652,6 @@ impl CodegenArgs {
656652
657653 run_spirv_opt,
658654
659- preserve_bindings,
660-
661655 linker_opts,
662656
663657 // NOTE(eddyb) these are debugging options that used to be env vars
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ fn post_link_single_module(
279279 let opt_options = spirv_tools:: opt:: Options {
280280 validator_options : Some ( val_options. clone ( ) ) ,
281281 max_id_bound : None ,
282- preserve_bindings : cg_args. preserve_bindings ,
282+ preserve_bindings : cg_args. linker_opts . preserve_bindings ,
283283 preserve_spec_constants : false ,
284284 } ;
285285
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ pub struct Options {
4242 pub early_report_zombies : bool ,
4343 pub infer_storage_classes : bool ,
4444 pub structurize : bool ,
45+ pub preserve_bindings : bool ,
4546 pub spirt_passes : Vec < String > ,
4647
4748 pub abort_strategy : Option < String > ,
You can’t perform that action at this time.
0 commit comments