@@ -911,8 +911,6 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
911911 "choose the relocation model to use (rustc --print relocation-models for details)" ) ,
912912 code_model: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
913913 "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)" ) ,
916914 metadata: Vec <String > = ( Vec :: new( ) , parse_list, [ TRACKED ] ,
917915 "metadata to mangle symbol names with" ) ,
918916 extra_filename: String = ( "" . to_string( ) , parse_string, [ UNTRACKED ] ,
@@ -1107,6 +1105,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
11071105 "enable ThinLTO when possible" ) ,
11081106 inline_in_all_cgus: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
11091107 "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)" ) ,
11101110}
11111111
11121112pub fn default_lib_output ( ) -> CrateType {
@@ -1475,7 +1475,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
14751475 } )
14761476 } ) ;
14771477
1478- let debugging_opts = build_debugging_options ( matches, error_format) ;
1478+ let mut debugging_opts = build_debugging_options ( matches, error_format) ;
14791479
14801480 let mut output_types = BTreeMap :: new ( ) ;
14811481 if !debugging_opts. parse_only {
@@ -1576,9 +1576,9 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
15761576 prints. push ( PrintRequest :: CodeModels ) ;
15771577 cg. code_model = None ;
15781578 }
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" ) {
15801580 prints. push ( PrintRequest :: TlsModels ) ;
1581- cg . tls_model = None ;
1581+ debugging_opts . tls_model = None ;
15821582 }
15831583
15841584 let cg = cg;
@@ -2523,7 +2523,7 @@ mod tests {
25232523 assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
25242524
25252525 opts = reference. clone ( ) ;
2526- opts. cg . tls_model = Some ( String :: from ( "tls model" ) ) ;
2526+ opts. debugging_opts . tls_model = Some ( String :: from ( "tls model" ) ) ;
25272527 assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
25282528
25292529 opts = reference. clone ( ) ;
0 commit comments