@@ -911,8 +911,6 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
911
911
"choose the relocation model to use (rustc --print relocation-models for details)" ) ,
912
912
code_model: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
913
913
"choose the code model to use (rustc --print code-models for details)" ) ,
914
- tls_model: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
915
- "choose the TLS model to use (rustc --print tls-models for details)" ) ,
916
914
metadata: Vec <String > = ( Vec :: new( ) , parse_list, [ TRACKED ] ,
917
915
"metadata to mangle symbol names with" ) ,
918
916
extra_filename: String = ( "" . to_string( ) , parse_string, [ UNTRACKED ] ,
@@ -1107,6 +1105,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
1107
1105
"enable ThinLTO when possible" ) ,
1108
1106
inline_in_all_cgus: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
1109
1107
"control whether #[inline] functions are in all cgus" ) ,
1108
+ tls_model: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1109
+ "choose the TLS model to use (rustc --print tls-models for details)" ) ,
1110
1110
}
1111
1111
1112
1112
pub fn default_lib_output ( ) -> CrateType {
@@ -1475,7 +1475,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1475
1475
} )
1476
1476
} ) ;
1477
1477
1478
- let debugging_opts = build_debugging_options ( matches, error_format) ;
1478
+ let mut debugging_opts = build_debugging_options ( matches, error_format) ;
1479
1479
1480
1480
let mut output_types = BTreeMap :: new ( ) ;
1481
1481
if !debugging_opts. parse_only {
@@ -1576,9 +1576,9 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1576
1576
prints. push ( PrintRequest :: CodeModels ) ;
1577
1577
cg. code_model = None ;
1578
1578
}
1579
- if cg . tls_model . as_ref ( ) . map_or ( false , |s| s == "help" ) {
1579
+ if debugging_opts . tls_model . as_ref ( ) . map_or ( false , |s| s == "help" ) {
1580
1580
prints. push ( PrintRequest :: TlsModels ) ;
1581
- cg . tls_model = None ;
1581
+ debugging_opts . tls_model = None ;
1582
1582
}
1583
1583
1584
1584
let cg = cg;
@@ -2523,7 +2523,7 @@ mod tests {
2523
2523
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
2524
2524
2525
2525
opts = reference. clone ( ) ;
2526
- opts. cg . tls_model = Some ( String :: from ( "tls model" ) ) ;
2526
+ opts. debugging_opts . tls_model = Some ( String :: from ( "tls model" ) ) ;
2527
2527
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
2528
2528
2529
2529
opts = reference. clone ( ) ;
0 commit comments