@@ -219,7 +219,7 @@ top_level_options!(
219219/// generated code to parse an option into its respective field in the struct. There are a few
220220/// hand-written parsers for parsing specific types of values in this module.
221221macro_rules! options {
222- ( $struct_name: ident, $stat: ident, $prefix: expr, $outputname: expr,
222+ ( $struct_name: ident, $stat: ident, $optmod : ident , $ prefix: expr, $outputname: expr,
223223 $( $( #[ $attr: meta] ) * $opt: ident : $t: ty = (
224224 $init: expr,
225225 $parse: ident,
@@ -264,13 +264,15 @@ macro_rules! options {
264264 }
265265
266266 pub const $stat: OptionDescrs <$struct_name> =
267- & [ $( ( stringify!( $opt) , $opt, desc:: $parse, $desc) ) ,* ] ;
267+ & [ $( ( stringify!( $opt) , $optmod :: $ opt, desc:: $parse, $desc) ) ,* ] ;
268268
269+ mod $optmod {
269270 $(
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)
272273 }
273274 ) *
275+ }
274276
275277) }
276278
@@ -918,7 +920,7 @@ mod parse {
918920}
919921
920922options ! {
921- CodegenOptions , CG_OPTIONS , "C" , "codegen" ,
923+ CodegenOptions , CG_OPTIONS , cgopts , "C" , "codegen" ,
922924
923925 // This list is in alphabetical order.
924926 //
@@ -1013,6 +1015,8 @@ options! {
10131015 "use soft float ABI (*eabihf targets only) (default: no)" ) ,
10141016 split_debuginfo: Option <SplitDebuginfo > = ( None , parse_split_debuginfo, [ TRACKED ] ,
10151017 "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`)" ) ,
10161020 target_cpu: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
10171021 "select target processor (`rustc --print target-cpus` for details)" ) ,
10181022 target_feature: String = ( String :: new( ) , parse_target_feature, [ TRACKED ] ,
@@ -1027,7 +1031,7 @@ options! {
10271031}
10281032
10291033options ! {
1030- DebuggingOptions , DB_OPTIONS , "Z" , "debugging" ,
1034+ DebuggingOptions , DB_OPTIONS , dbopts , "Z" , "debugging" ,
10311035
10321036 // This list is in alphabetical order.
10331037 //
0 commit comments