@@ -219,7 +219,7 @@ top_level_options!(
219
219
/// generated code to parse an option into its respective field in the struct. There are a few
220
220
/// hand-written parsers for parsing specific types of values in this module.
221
221
macro_rules! options {
222
- ( $struct_name: ident, $stat: ident, $prefix: expr, $outputname: expr,
222
+ ( $struct_name: ident, $stat: ident, $optmod : ident , $ prefix: expr, $outputname: expr,
223
223
$( $( #[ $attr: meta] ) * $opt: ident : $t: ty = (
224
224
$init: expr,
225
225
$parse: ident,
@@ -264,13 +264,15 @@ macro_rules! options {
264
264
}
265
265
266
266
pub const $stat: OptionDescrs <$struct_name> =
267
- & [ $( ( stringify!( $opt) , $opt, desc:: $parse, $desc) ) ,* ] ;
267
+ & [ $( ( stringify!( $opt) , $optmod :: $ opt, desc:: $parse, $desc) ) ,* ] ;
268
268
269
+ mod $optmod {
269
270
$(
270
- fn $opt( cg: & mut $struct_name, v: Option <& str >) -> bool {
271
- parse:: $parse( & mut redirect_field!( cg. $opt) , v)
271
+ pub ( super ) fn $opt( cg: & mut super :: $struct_name, v: Option <& str >) -> bool {
272
+ super :: parse:: $parse( & mut redirect_field!( cg. $opt) , v)
272
273
}
273
274
) *
275
+ }
274
276
275
277
) }
276
278
@@ -918,7 +920,7 @@ mod parse {
918
920
}
919
921
920
922
options ! {
921
- CodegenOptions , CG_OPTIONS , "C" , "codegen" ,
923
+ CodegenOptions , CG_OPTIONS , cgopts , "C" , "codegen" ,
922
924
923
925
// This list is in alphabetical order.
924
926
//
@@ -1013,6 +1015,8 @@ options! {
1013
1015
"use soft float ABI (*eabihf targets only) (default: no)" ) ,
1014
1016
split_debuginfo: Option <SplitDebuginfo > = ( None , parse_split_debuginfo, [ TRACKED ] ,
1015
1017
"how to handle split-debuginfo, a platform-specific option" ) ,
1018
+ strip: Strip = ( Strip :: None , parse_strip, [ UNTRACKED ] ,
1019
+ "tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)" ) ,
1016
1020
target_cpu: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1017
1021
"select target processor (`rustc --print target-cpus` for details)" ) ,
1018
1022
target_feature: String = ( String :: new( ) , parse_target_feature, [ TRACKED ] ,
@@ -1027,7 +1031,7 @@ options! {
1027
1031
}
1028
1032
1029
1033
options ! {
1030
- DebuggingOptions , DB_OPTIONS , "Z" , "debugging" ,
1034
+ DebuggingOptions , DB_OPTIONS , dbopts , "Z" , "debugging" ,
1031
1035
1032
1036
// This list is in alphabetical order.
1033
1037
//
0 commit comments