Skip to content

Commit 08c5ffd

Browse files
committed
Convert -Z mutable-noalias to Optional<bool>
The default value will dependend on the LLVM version in the future, so don't specify one to start with.
1 parent dfc4caf commit 08c5ffd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_codegen_llvm/src/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn should_use_mutable_noalias(cx: &CodegenCx<'_, '_>) -> bool {
6262
//
6363
// For now, do not enable mutable_noalias by default at all, while the
6464
// issue is being figured out.
65-
cx.tcx.sess.opts.debugging_opts.mutable_noalias
65+
cx.tcx.sess.opts.debugging_opts.mutable_noalias.unwrap_or(false)
6666
}
6767

6868
impl ArgAttributesExt for ArgAttributes {

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ fn test_debugging_options_tracking_hash() {
566566
tracked!(merge_functions, Some(MergeFunctions::Disabled));
567567
tracked!(mir_emit_retag, true);
568568
tracked!(mir_opt_level, Some(4));
569-
tracked!(mutable_noalias, true);
569+
tracked!(mutable_noalias, Some(true));
570570
tracked!(new_llvm_pass_manager, true);
571571
tracked!(no_codegen, true);
572572
tracked!(no_generate_arange_section, true);

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
997997
(default: no)"),
998998
mir_opt_level: Option<usize> = (None, parse_opt_uint, [TRACKED],
999999
"MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),
1000-
mutable_noalias: bool = (false, parse_bool, [TRACKED],
1000+
mutable_noalias: Option<bool> = (None, parse_opt_bool, [TRACKED],
10011001
"emit noalias metadata for mutable references (default: no)"),
10021002
new_llvm_pass_manager: bool = (false, parse_bool, [TRACKED],
10031003
"use new LLVM pass manager (default: no)"),

0 commit comments

Comments
 (0)