@@ -613,7 +613,7 @@ macro_rules! options {
613613options ! { CodegenOptions , CodegenSetter , basic_codegen_options,
614614 build_codegen_options, "C" , "codegen" ,
615615 CG_OPTIONS , cg_type_desc, cgsetters,
616- ar: Option < String > = ( None , parse_opt_string , [ UNTRACKED ] ,
616+ ar: String = ( String :: new ( ) , parse_string , [ UNTRACKED ] ,
617617 "this option is deprecated and does nothing" ) ,
618618 linker: Option <PathBuf > = ( None , parse_opt_pathbuf, [ UNTRACKED ] ,
619619 "system linker to link outputs with" ) ,
@@ -666,10 +666,10 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
666666 "print remarks for these optimization passes (space separated, or \" all\" )" ) ,
667667 no_stack_check: bool = ( false , parse_bool, [ UNTRACKED ] ,
668668 "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 ] ,
670670 "debug info emission level, 0 = no debug info, 1 = line tables only, \
671671 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 ] ,
673673 "optimize with possible levels 0-3, s, or z" ) ,
674674 force_frame_pointers: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
675675 "force use of the frame pointers" ) ,
@@ -681,7 +681,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
681681 [ TRACKED ] , "panic strategy to compile crate with" ) ,
682682 incremental: Option <String > = ( None , parse_opt_string, [ UNTRACKED ] ,
683683 "enable incremental compilation" ) ,
684- default_linker_libraries: Option < bool > = ( None , parse_opt_bool , [ UNTRACKED ] ,
684+ default_linker_libraries: bool = ( false , parse_bool , [ UNTRACKED ] ,
685685 "allow the linker to link its default libraries" ) ,
686686 linker_flavor: Option <LinkerFlavor > = ( None , parse_linker_flavor, [ UNTRACKED ] ,
687687 "linker flavor" ) ,
@@ -706,7 +706,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
706706 "when debug-printing compiler state, do not include spans" ) , // o/w tests have closure@path
707707 identify_regions: bool = ( false , parse_bool, [ UNTRACKED ] ,
708708 "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 ] ,
710710 "select which borrowck is used (`mir` or `migrate`)" ) ,
711711 time_passes: bool = ( false , parse_bool, [ UNTRACKED ] ,
712712 "measure time of each rustc pass" ) ,
@@ -806,7 +806,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
806806 "print the result of the monomorphization collection pass" ) ,
807807 mir_opt_level: usize = ( 1 , parse_uint, [ TRACKED ] ,
808808 "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 ] ,
810810 "emit noalias metadata for mutable references (default: no)" ) ,
811811 dump_mir: Option <String > = ( None , parse_opt_string, [ UNTRACKED ] ,
812812 "dump MIR state to file.
@@ -816,7 +816,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
816816 `foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo',
817817 `foo | bar` all passes for function names containing 'foo' or 'bar'." ) ,
818818
819- dump_mir_dir: String = ( String :: from ( "mir_dump" ) , parse_string, [ UNTRACKED ] ,
819+ dump_mir_dir: String = ( "mir_dump" . to_string ( ) , parse_string, [ UNTRACKED ] ,
820820 "the directory the MIR is dumped into" ) ,
821821 dump_mir_graphviz: bool = ( false , parse_bool, [ UNTRACKED ] ,
822822 "in addition to `.mir` files, create graphviz `.dot` files" ) ,
@@ -890,13 +890,16 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
890890 `hir,typed` (HIR with types for each node),
891891 `hir-tree` (dump the raw HIR),
892892 `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 ] ,
894897 "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 ] ,
896899 "format compiler diagnostics in a way that's better suitable for UI testing" ) ,
897900 embed_bitcode: bool = ( false , parse_bool, [ TRACKED ] ,
898901 "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 ] ,
900903 "tell the linker to strip debuginfo when building without debuginfo enabled" ) ,
901904 share_generics: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
902905 "make the current crate share its generic instantiations" ) ,
@@ -936,17 +939,17 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
936939 insert_sideeffect: bool = ( false , parse_bool, [ TRACKED ] ,
937940 "fix undefined behavior when a thread doesn't eventually make progress \
938941 (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 ] ,
940943 "deduplicate identical diagnostics" ) ,
941944 control_flow_guard: CFGuard = ( CFGuard :: Disabled , parse_cfguard, [ UNTRACKED ] ,
942945 "use Windows Control Flow Guard (`disabled`, `nochecks` or `checks`)" ) ,
943946 no_link: bool = ( false , parse_bool, [ TRACKED ] ,
944947 "compile without linking" ) ,
945948 link_only: bool = ( false , parse_bool, [ TRACKED ] ,
946949 "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 ] ,
948951 "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 ] ,
950953 "link native libraries in the linker invocation" ) ,
951954 src_hash_algorithm: Option <SourceFileHashAlgorithm > = ( None , parse_src_file_hash, [ TRACKED ] ,
952955 "hash algorithm of source files in debug info (`md5`, or `sha1`)" ) ,
0 commit comments