@@ -613,7 +613,7 @@ macro_rules! options {
613
613
options ! { CodegenOptions , CodegenSetter , basic_codegen_options,
614
614
build_codegen_options, "C" , "codegen" ,
615
615
CG_OPTIONS , cg_type_desc, cgsetters,
616
- ar: Option < String > = ( None , parse_opt_string , [ UNTRACKED ] ,
616
+ ar: String = ( String :: new ( ) , parse_string , [ UNTRACKED ] ,
617
617
"this option is deprecated and does nothing" ) ,
618
618
linker: Option <PathBuf > = ( None , parse_opt_pathbuf, [ UNTRACKED ] ,
619
619
"system linker to link outputs with" ) ,
@@ -666,10 +666,10 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
666
666
"print remarks for these optimization passes (space separated, or \" all\" )" ) ,
667
667
no_stack_check: bool = ( false , parse_bool, [ UNTRACKED ] ,
668
668
"the `--no-stack-check` flag is deprecated and does nothing" ) ,
669
- debuginfo: Option < usize > = ( None , parse_opt_uint , [ TRACKED ] ,
669
+ debuginfo: usize = ( 0 , parse_uint , [ TRACKED ] ,
670
670
"debug info emission level, 0 = no debug info, 1 = line tables only, \
671
671
2 = full debug info with variable and type information") ,
672
- opt_level: Option < String > = ( None , parse_opt_string , [ TRACKED ] ,
672
+ opt_level: String = ( "0" . to_string ( ) , parse_string , [ TRACKED ] ,
673
673
"optimize with possible levels 0-3, s, or z" ) ,
674
674
force_frame_pointers: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
675
675
"force use of the frame pointers" ) ,
@@ -681,7 +681,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
681
681
[ TRACKED ] , "panic strategy to compile crate with" ) ,
682
682
incremental: Option <String > = ( None , parse_opt_string, [ UNTRACKED ] ,
683
683
"enable incremental compilation" ) ,
684
- default_linker_libraries: Option < bool > = ( None , parse_opt_bool , [ UNTRACKED ] ,
684
+ default_linker_libraries: bool = ( false , parse_bool , [ UNTRACKED ] ,
685
685
"allow the linker to link its default libraries" ) ,
686
686
linker_flavor: Option <LinkerFlavor > = ( None , parse_linker_flavor, [ UNTRACKED ] ,
687
687
"linker flavor" ) ,
@@ -706,7 +706,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
706
706
"when debug-printing compiler state, do not include spans" ) , // o/w tests have closure@path
707
707
identify_regions: bool = ( false , parse_bool, [ UNTRACKED ] ,
708
708
"make unnamed regions display as '# (where # is some non-ident unique id)" ) ,
709
- borrowck: Option < String > = ( None , parse_opt_string , [ UNTRACKED ] ,
709
+ borrowck: String = ( "migrate" . to_string ( ) , parse_string , [ UNTRACKED ] ,
710
710
"select which borrowck is used (`mir` or `migrate`)" ) ,
711
711
time_passes: bool = ( false , parse_bool, [ UNTRACKED ] ,
712
712
"measure time of each rustc pass" ) ,
@@ -806,7 +806,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
806
806
"print the result of the monomorphization collection pass" ) ,
807
807
mir_opt_level: usize = ( 1 , parse_uint, [ TRACKED ] ,
808
808
"set the MIR optimization level (0-3, default: 1)" ) ,
809
- mutable_noalias: Option < bool > = ( None , parse_opt_bool , [ TRACKED ] ,
809
+ mutable_noalias: bool = ( false , parse_bool , [ TRACKED ] ,
810
810
"emit noalias metadata for mutable references (default: no)" ) ,
811
811
dump_mir: Option <String > = ( None , parse_opt_string, [ UNTRACKED ] ,
812
812
"dump MIR state to file.
@@ -816,7 +816,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
816
816
`foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo',
817
817
`foo | bar` all passes for function names containing 'foo' or 'bar'." ) ,
818
818
819
- dump_mir_dir: String = ( String :: from ( "mir_dump" ) , parse_string, [ UNTRACKED ] ,
819
+ dump_mir_dir: String = ( "mir_dump" . to_string ( ) , parse_string, [ UNTRACKED ] ,
820
820
"the directory the MIR is dumped into" ) ,
821
821
dump_mir_graphviz: bool = ( false , parse_bool, [ UNTRACKED ] ,
822
822
"in addition to `.mir` files, create graphviz `.dot` files" ) ,
@@ -890,13 +890,16 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
890
890
`hir,typed` (HIR with types for each node),
891
891
`hir-tree` (dump the raw HIR),
892
892
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)" ) ,
893
- run_dsymutil: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
893
+ // The default historical behavior was to always run dsymutil, so we're
894
+ // preserving that temporarily, but we're likely to switch the default
895
+ // soon.
896
+ run_dsymutil: bool = ( true , parse_bool, [ TRACKED ] ,
894
897
"run `dsymutil` and delete intermediate object files" ) ,
895
- ui_testing: Option < bool > = ( None , parse_opt_bool , [ UNTRACKED ] ,
898
+ ui_testing: bool = ( false , parse_bool , [ UNTRACKED ] ,
896
899
"format compiler diagnostics in a way that's better suitable for UI testing" ) ,
897
900
embed_bitcode: bool = ( false , parse_bool, [ TRACKED ] ,
898
901
"embed LLVM bitcode in object files" ) ,
899
- strip_debuginfo_if_disabled: Option < bool > = ( None , parse_opt_bool , [ TRACKED ] ,
902
+ strip_debuginfo_if_disabled: bool = ( false , parse_bool , [ TRACKED ] ,
900
903
"tell the linker to strip debuginfo when building without debuginfo enabled" ) ,
901
904
share_generics: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
902
905
"make the current crate share its generic instantiations" ) ,
@@ -936,17 +939,17 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
936
939
insert_sideeffect: bool = ( false , parse_bool, [ TRACKED ] ,
937
940
"fix undefined behavior when a thread doesn't eventually make progress \
938
941
(such as entering an empty infinite loop) by inserting llvm.sideeffect") ,
939
- deduplicate_diagnostics: Option < bool > = ( None , parse_opt_bool , [ UNTRACKED ] ,
942
+ deduplicate_diagnostics: bool = ( true , parse_bool , [ UNTRACKED ] ,
940
943
"deduplicate identical diagnostics" ) ,
941
944
control_flow_guard: CFGuard = ( CFGuard :: Disabled , parse_cfguard, [ UNTRACKED ] ,
942
945
"use Windows Control Flow Guard (`disabled`, `nochecks` or `checks`)" ) ,
943
946
no_link: bool = ( false , parse_bool, [ TRACKED ] ,
944
947
"compile without linking" ) ,
945
948
link_only: bool = ( false , parse_bool, [ TRACKED ] ,
946
949
"link the `.rlink` file generated by `-Z no-link`" ) ,
947
- new_llvm_pass_manager: Option < bool > = ( None , parse_opt_bool , [ TRACKED ] ,
950
+ new_llvm_pass_manager: bool = ( false , parse_bool , [ TRACKED ] ,
948
951
"use new LLVM pass manager" ) ,
949
- link_native_libraries: Option < bool > = ( None , parse_opt_bool , [ UNTRACKED ] ,
952
+ link_native_libraries: bool = ( true , parse_bool , [ UNTRACKED ] ,
950
953
"link native libraries in the linker invocation" ) ,
951
954
src_hash_algorithm: Option <SourceFileHashAlgorithm > = ( None , parse_src_file_hash, [ TRACKED ] ,
952
955
"hash algorithm of source files in debug info (`md5`, or `sha1`)" ) ,
0 commit comments