Skip to content

Commit 0ed9c64

Browse files
committed
Auto merge of #98975 - jyn514:unstable_opts, r=wesleywiser
Rename `debugging_opts` to `unstable_opts` This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear. cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Codegen.20options.20.2F.20debugging.20options r? `@Amanieu` cc `@nikic` `@joshtriplett`
2 parents 431c6f8 + 3c9765c commit 0ed9c64

File tree

125 files changed

+396
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+396
-394
lines changed

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub fn lower_to_hir<'hir>(tcx: TyCtxt<'hir>, (): ()) -> hir::Crate<'hir> {
427427
sess.time("drop_ast", || std::mem::drop(krate));
428428

429429
// Discard hygiene data, which isn't required after lowering to HIR.
430-
if !sess.opts.debugging_opts.keep_hygiene_data {
430+
if !sess.opts.unstable_opts.keep_hygiene_data {
431431
rustc_span::hygiene::clear_syntax_context_map();
432432
}
433433

@@ -699,7 +699,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
699699
/// Intercept all spans entering HIR.
700700
/// Mark a span as relative to the current owning item.
701701
fn lower_span(&self, span: Span) -> Span {
702-
if self.tcx.sess.opts.debugging_opts.incremental_relative_spans {
702+
if self.tcx.sess.opts.unstable_opts.incremental_relative_spans {
703703
span.with_parent(Some(self.current_hir_id_owner))
704704
} else {
705705
// Do not make spans relative when not using incremental compilation.

Diff for: compiler/rustc_borrowck/src/facts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub(crate) trait AllFactsExt {
4040
impl AllFactsExt for AllFacts {
4141
/// Return
4242
fn enabled(tcx: TyCtxt<'_>) -> bool {
43-
tcx.sess.opts.debugging_opts.nll_facts || tcx.sess.opts.debugging_opts.polonius
43+
tcx.sess.opts.unstable_opts.nll_facts || tcx.sess.opts.unstable_opts.polonius
4444
}
4545

4646
fn write_to_dir(

Diff for: compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fn do_mir_borrowck<'a, 'tcx>(
231231
let borrow_set =
232232
Rc::new(BorrowSet::build(tcx, body, locals_are_invalidated_at_exit, &mdpe.move_data));
233233

234-
let use_polonius = return_body_with_facts || infcx.tcx.sess.opts.debugging_opts.polonius;
234+
let use_polonius = return_body_with_facts || infcx.tcx.sess.opts.unstable_opts.polonius;
235235

236236
// Compute non-lexical lifetimes.
237237
let nll::NllOutput {

Diff for: compiler/rustc_borrowck/src/nll.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
278278

279279
// Dump facts if requested.
280280
let polonius_output = all_facts.as_ref().and_then(|all_facts| {
281-
if infcx.tcx.sess.opts.debugging_opts.nll_facts {
281+
if infcx.tcx.sess.opts.unstable_opts.nll_facts {
282282
let def_path = infcx.tcx.def_path(def_id);
283-
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.debugging_opts.nll_facts_dir)
283+
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.unstable_opts.nll_facts_dir)
284284
.join(def_path.to_filename_friendly_no_crate());
285285
all_facts.write_to_dir(dir_path, location_table).unwrap();
286286
}

Diff for: compiler/rustc_borrowck/src/region_infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
589589
// In Polonius mode, the errors about missing universal region relations are in the output
590590
// and need to be emitted or propagated. Otherwise, we need to check whether the
591591
// constraints were too strong, and if so, emit or propagate those errors.
592-
if infcx.tcx.sess.opts.debugging_opts.polonius {
592+
if infcx.tcx.sess.opts.unstable_opts.polonius {
593593
self.check_polonius_subset_errors(
594594
body,
595595
outlives_requirements.as_mut(),

Diff for: compiler/rustc_builtin_macros/src/test_harness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn inject(sess: &Session, resolver: &mut dyn ResolverExpand, krate: &mut ast
5151
let test_runner = get_test_runner(sess, span_diagnostic, &krate);
5252

5353
if sess.opts.test {
54-
let panic_strategy = match (panic_strategy, sess.opts.debugging_opts.panic_abort_tests) {
54+
let panic_strategy = match (panic_strategy, sess.opts.unstable_opts.panic_abort_tests) {
5555
(PanicStrategy::Abort, true) => PanicStrategy::Abort,
5656
(PanicStrategy::Abort, false) => {
5757
if panic_strategy == platform_panic_strategy {

Diff for: compiler/rustc_codegen_cranelift/src/allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(crate) fn codegen(
2424
unwind_context,
2525
kind,
2626
tcx.lang_items().oom().is_some(),
27-
tcx.sess.opts.debugging_opts.oom,
27+
tcx.sess.opts.unstable_opts.oom,
2828
);
2929
true
3030
} else {

Diff for: compiler/rustc_codegen_cranelift/src/cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub(crate) fn clif_int_or_float_cast(
144144
fx.bcx.ins().fcvt_to_uint_sat(to_ty, from)
145145
};
146146

147-
if let Some(false) = fx.tcx.sess.opts.debugging_opts.saturating_float_casts {
147+
if let Some(false) = fx.tcx.sess.opts.unstable_opts.saturating_float_casts {
148148
return val;
149149
}
150150

Diff for: compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<'tcx> DebugContext<'tcx> {
140140
// In order to have a good line stepping behavior in debugger, we overwrite debug
141141
// locations of macro expansions with that of the outermost expansion site
142142
// (unless the crate is being compiled with `-Z debug-macros`).
143-
let span = if !span.from_expansion() || tcx.sess.opts.debugging_opts.debug_macros {
143+
let span = if !span.from_expansion() || tcx.sess.opts.unstable_opts.debug_macros {
144144
span
145145
} else {
146146
// Walk up the macro expansion chain until we reach a non-expanded span.

Diff for: compiler/rustc_codegen_cranelift/src/driver/aot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn make_module(sess: &Session, isa: Box<dyn TargetIsa>, name: String) -> ObjectM
3333
// Unlike cg_llvm, cg_clif defaults to disabling -Zfunction-sections. For cg_llvm binary size
3434
// is important, while cg_clif cares more about compilation times. Enabling -Zfunction-sections
3535
// can easily double the amount of time necessary to perform linking.
36-
builder.per_function_section(sess.opts.debugging_opts.function_sections.unwrap_or(false));
36+
builder.per_function_section(sess.opts.unstable_opts.function_sections.unwrap_or(false));
3737
ObjectModule::new(builder)
3838
}
3939

Diff for: compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
676676
&& !layout.might_permit_raw_init(
677677
fx,
678678
InitKind::Zero,
679-
fx.tcx.sess.opts.debugging_opts.strict_init_checks) {
679+
fx.tcx.sess.opts.unstable_opts.strict_init_checks) {
680680

681681
with_no_trimmed_paths!({
682682
crate::base::codegen_panic(
@@ -692,7 +692,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
692692
&& !layout.might_permit_raw_init(
693693
fx,
694694
InitKind::Uninit,
695-
fx.tcx.sess.opts.debugging_opts.strict_init_checks) {
695+
fx.tcx.sess.opts.unstable_opts.strict_init_checks) {
696696

697697
with_no_trimmed_paths!({
698698
crate::base::codegen_panic(

Diff for: compiler/rustc_codegen_gcc/src/allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub(crate) unsafe fn codegen(tcx: TyCtxt<'_>, mods: &mut GccContext, _module_nam
117117

118118
let name = OomStrategy::SYMBOL.to_string();
119119
let global = context.new_global(None, GlobalKind::Exported, i8, name);
120-
let value = tcx.sess.opts.debugging_opts.oom.should_panic();
120+
let value = tcx.sess.opts.unstable_opts.oom.should_panic();
121121
let value = context.new_rvalue_from_int(i8, value as i32);
122122
global.global_set_initializer_rvalue(value);
123123
}

Diff for: compiler/rustc_codegen_gcc/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol, supports_
9696
// NOTE: Rust relies on LLVM not doing TBAA (https://github.com/rust-lang/unsafe-code-guidelines/issues/292).
9797
context.add_command_line_option("-fno-strict-aliasing");
9898

99-
if tcx.sess.opts.debugging_opts.function_sections.unwrap_or(tcx.sess.target.function_sections) {
99+
if tcx.sess.opts.unstable_opts.function_sections.unwrap_or(tcx.sess.target.function_sections) {
100100
context.add_command_line_option("-ffunction-sections");
101101
context.add_command_line_option("-fdata-sections");
102102
}

Diff for: compiler/rustc_codegen_llvm/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn should_use_mutable_noalias(cx: &CodegenCx<'_, '_>) -> bool {
3737
// LLVM prior to version 12 had known miscompiles in the presence of
3838
// noalias attributes (see #54878), but we don't support earlier
3939
// versions at all anymore. We now enable mutable noalias by default.
40-
cx.tcx.sess.opts.debugging_opts.mutable_noalias.unwrap_or(true)
40+
cx.tcx.sess.opts.unstable_opts.mutable_noalias.unwrap_or(true)
4141
}
4242

4343
const ABI_AFFECTING_ATTRIBUTES: [(ArgAttribute, llvm::AttributeKind); 1] =

Diff for: compiler/rustc_codegen_llvm/src/allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub(crate) unsafe fn codegen(
145145
if tcx.sess.target.default_hidden_visibility {
146146
llvm::LLVMRustSetVisibility(ll_g, llvm::Visibility::Hidden);
147147
}
148-
let val = tcx.sess.opts.debugging_opts.oom.should_panic();
148+
let val = tcx.sess.opts.unstable_opts.oom.should_panic();
149149
let llval = llvm::LLVMConstInt(i8, val as u64, False);
150150
llvm::LLVMSetInitializer(ll_g, llval);
151151

Diff for: compiler/rustc_codegen_llvm/src/attributes.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn sanitize_attrs<'ll>(
5656
no_sanitize: SanitizerSet,
5757
) -> SmallVec<[&'ll Attribute; 4]> {
5858
let mut attrs = SmallVec::new();
59-
let enabled = cx.tcx.sess.opts.debugging_opts.sanitizer - no_sanitize;
59+
let enabled = cx.tcx.sess.opts.unstable_opts.sanitizer - no_sanitize;
6060
if enabled.contains(SanitizerSet::ADDRESS) {
6161
attrs.push(llvm::AttributeKind::SanitizeAddress.create_attr(cx.llcx));
6262
}
@@ -136,7 +136,7 @@ fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
136136
if cx
137137
.sess()
138138
.opts
139-
.debugging_opts
139+
.unstable_opts
140140
.sanitizer
141141
.intersects(SanitizerSet::ADDRESS | SanitizerSet::THREAD)
142142
{
@@ -149,7 +149,7 @@ fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
149149
}
150150

151151
// probestack doesn't play nice either with gcov profiling.
152-
if cx.sess().opts.debugging_opts.profile {
152+
if cx.sess().opts.unstable_opts.profile {
153153
return None;
154154
}
155155

@@ -275,7 +275,7 @@ pub fn from_fn_attrs<'ll, 'tcx>(
275275
to_add.push(uwtable_attr(cx.llcx));
276276
}
277277

278-
if cx.sess().opts.debugging_opts.profile_sample_use.is_some() {
278+
if cx.sess().opts.unstable_opts.profile_sample_use.is_some() {
279279
to_add.push(llvm::CreateAttrString(cx.llcx, "use-sample-profile"));
280280
}
281281

Diff for: compiler/rustc_codegen_llvm/src/back/archive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fn string_to_io_error(s: String) -> io::Error {
351351

352352
fn find_binutils_dlltool(sess: &Session) -> OsString {
353353
assert!(sess.target.options.is_like_windows && !sess.target.options.is_like_msvc);
354-
if let Some(dlltool_path) = &sess.opts.debugging_opts.dlltool {
354+
if let Some(dlltool_path) = &sess.opts.unstable_opts.dlltool {
355355
return dlltool_path.clone().into_os_string();
356356
}
357357

Diff for: compiler/rustc_codegen_llvm/src/back/write.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn create_target_machine(tcx: TyCtxt<'_>, mod_name: &str) -> &'static mut ll
107107
let split_dwarf_file = if tcx.sess.target_can_use_split_dwarf() {
108108
tcx.output_filenames(()).split_dwarf_path(
109109
tcx.sess.split_debuginfo(),
110-
tcx.sess.opts.debugging_opts.split_dwarf_kind,
110+
tcx.sess.opts.unstable_opts.split_dwarf_kind,
111111
Some(mod_name),
112112
)
113113
} else {
@@ -182,9 +182,9 @@ pub fn target_machine_factory(
182182
let use_softfp = sess.opts.cg.soft_float;
183183

184184
let ffunction_sections =
185-
sess.opts.debugging_opts.function_sections.unwrap_or(sess.target.function_sections);
185+
sess.opts.unstable_opts.function_sections.unwrap_or(sess.target.function_sections);
186186
let fdata_sections = ffunction_sections;
187-
let funique_section_names = !sess.opts.debugging_opts.no_unique_section_names;
187+
let funique_section_names = !sess.opts.unstable_opts.no_unique_section_names;
188188

189189
let code_model = to_llvm_code_model(sess.code_model());
190190

@@ -202,15 +202,15 @@ pub fn target_machine_factory(
202202
let features = CString::new(target_features.join(",")).unwrap();
203203
let abi = SmallCStr::new(&sess.target.llvm_abiname);
204204
let trap_unreachable =
205-
sess.opts.debugging_opts.trap_unreachable.unwrap_or(sess.target.trap_unreachable);
206-
let emit_stack_size_section = sess.opts.debugging_opts.emit_stack_sizes;
205+
sess.opts.unstable_opts.trap_unreachable.unwrap_or(sess.target.trap_unreachable);
206+
let emit_stack_size_section = sess.opts.unstable_opts.emit_stack_sizes;
207207

208208
let asm_comments = sess.asm_comments();
209209
let relax_elf_relocations =
210-
sess.opts.debugging_opts.relax_elf_relocations.unwrap_or(sess.target.relax_elf_relocations);
210+
sess.opts.unstable_opts.relax_elf_relocations.unwrap_or(sess.target.relax_elf_relocations);
211211

212212
let use_init_array =
213-
!sess.opts.debugging_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
213+
!sess.opts.unstable_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
214214

215215
let path_mapping = sess.source_map().path_mapping().clone();
216216

Diff for: compiler/rustc_codegen_llvm/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
6464
// See https://github.com/rust-lang/rust/issues/84565.
6565
1
6666
} else {
67-
cx.sess().opts.debugging_opts.uninit_const_chunk_threshold
67+
cx.sess().opts.unstable_opts.uninit_const_chunk_threshold
6868
};
6969
let allow_uninit_chunks = chunks.clone().take(max.saturating_add(1)).count() <= max;
7070

Diff for: compiler/rustc_codegen_llvm/src/context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub unsafe fn create_module<'ll>(
275275
}
276276
}
277277

278-
if let Some(BranchProtection { bti, pac_ret }) = sess.opts.debugging_opts.branch_protection {
278+
if let Some(BranchProtection { bti, pac_ret }) = sess.opts.unstable_opts.branch_protection {
279279
if sess.target.arch != "aarch64" {
280280
sess.err("-Zbranch-protection is only supported on aarch64");
281281
} else {
@@ -308,15 +308,15 @@ pub unsafe fn create_module<'ll>(
308308
}
309309

310310
// Pass on the control-flow protection flags to LLVM (equivalent to `-fcf-protection` in Clang).
311-
if let CFProtection::Branch | CFProtection::Full = sess.opts.debugging_opts.cf_protection {
311+
if let CFProtection::Branch | CFProtection::Full = sess.opts.unstable_opts.cf_protection {
312312
llvm::LLVMRustAddModuleFlag(
313313
llmod,
314314
llvm::LLVMModFlagBehavior::Override,
315315
"cf-protection-branch\0".as_ptr().cast(),
316316
1,
317317
)
318318
}
319-
if let CFProtection::Return | CFProtection::Full = sess.opts.debugging_opts.cf_protection {
319+
if let CFProtection::Return | CFProtection::Full = sess.opts.unstable_opts.cf_protection {
320320
llvm::LLVMRustAddModuleFlag(
321321
llmod,
322322
llvm::LLVMModFlagBehavior::Override,
@@ -325,7 +325,7 @@ pub unsafe fn create_module<'ll>(
325325
)
326326
}
327327

328-
if sess.opts.debugging_opts.virtual_function_elimination {
328+
if sess.opts.unstable_opts.virtual_function_elimination {
329329
llvm::LLVMRustAddModuleFlag(
330330
llmod,
331331
llvm::LLVMModFlagBehavior::Error,

Diff for: compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
824824
output_filenames
825825
.split_dwarf_path(
826826
tcx.sess.split_debuginfo(),
827-
tcx.sess.opts.debugging_opts.split_dwarf_kind,
827+
tcx.sess.opts.unstable_opts.split_dwarf_kind,
828828
Some(codegen_unit_name),
829829
)
830830
// We get a path relative to the working directory from split_dwarf_path
@@ -881,15 +881,15 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
881881
split_name.len(),
882882
kind,
883883
0,
884-
tcx.sess.opts.debugging_opts.split_dwarf_inlining,
884+
tcx.sess.opts.unstable_opts.split_dwarf_inlining,
885885
);
886886

887-
if tcx.sess.opts.debugging_opts.profile {
887+
if tcx.sess.opts.unstable_opts.profile {
888888
let cu_desc_metadata =
889889
llvm::LLVMRustMetadataAsValue(debug_context.llcontext, unit_metadata);
890890
let default_gcda_path = &output_filenames.with_extension("gcda");
891891
let gcda_path =
892-
tcx.sess.opts.debugging_opts.profile_emit.as_ref().unwrap_or(default_gcda_path);
892+
tcx.sess.opts.unstable_opts.profile_emit.as_ref().unwrap_or(default_gcda_path);
893893

894894
let gcov_cu_info = [
895895
path_to_mdstring(debug_context.llcontext, &output_filenames.with_extension("gcno")),
@@ -1559,7 +1559,7 @@ pub fn create_vtable_di_node<'ll, 'tcx>(
15591559
) {
15601560
// FIXME(flip1995): The virtual function elimination optimization only works with full LTO in
15611561
// LLVM at the moment.
1562-
if cx.sess().opts.debugging_opts.virtual_function_elimination && cx.sess().lto() == Lto::Fat {
1562+
if cx.sess().opts.unstable_opts.virtual_function_elimination && cx.sess().lto() == Lto::Fat {
15631563
vcall_visibility_metadata(cx, ty, poly_trait_ref, vtable);
15641564
}
15651565

Diff for: compiler/rustc_codegen_llvm/src/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
104104
// This can be overridden using --llvm-opts -dwarf-version,N.
105105
// Android has the same issue (#22398)
106106
let dwarf_version =
107-
sess.opts.debugging_opts.dwarf_version.unwrap_or(sess.target.default_dwarf_version);
107+
sess.opts.unstable_opts.dwarf_version.unwrap_or(sess.target.default_dwarf_version);
108108
llvm::LLVMRustAddModuleFlag(
109109
self.llmod,
110110
llvm::LLVMModFlagBehavior::Warning,

Diff for: compiler/rustc_codegen_llvm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl CodegenBackend for LlvmCodegenBackend {
355355
.join(sess);
356356

357357
sess.time("llvm_dump_timing_file", || {
358-
if sess.opts.debugging_opts.llvm_time_trace {
358+
if sess.opts.unstable_opts.llvm_time_trace {
359359
let file_name = outputs.with_extension("llvm_timings.json");
360360
llvm_util::time_trace_profiler_finish(&file_name);
361361
}

Diff for: compiler/rustc_codegen_llvm/src/llvm_util.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ unsafe fn configure_llvm(sess: &Session) {
8787
add("-debug-pass=Structure", false);
8888
}
8989
if sess.target.generate_arange_section
90-
&& !sess.opts.debugging_opts.no_generate_arange_section
90+
&& !sess.opts.unstable_opts.no_generate_arange_section
9191
{
9292
add("-generate-arange-section", false);
9393
}
@@ -102,7 +102,7 @@ unsafe fn configure_llvm(sess: &Session) {
102102
add("-enable-machine-outliner=never", false);
103103
}
104104

105-
match sess.opts.debugging_opts.merge_functions.unwrap_or(sess.target.merge_functions) {
105+
match sess.opts.unstable_opts.merge_functions.unwrap_or(sess.target.merge_functions) {
106106
MergeFunctions::Disabled | MergeFunctions::Trampolines => {}
107107
MergeFunctions::Aliases => {
108108
add("-mergefunc-use-aliases", false);
@@ -125,19 +125,19 @@ unsafe fn configure_llvm(sess: &Session) {
125125
}
126126
}
127127

128-
if sess.opts.debugging_opts.llvm_time_trace {
128+
if sess.opts.unstable_opts.llvm_time_trace {
129129
llvm::LLVMTimeTraceProfilerInitialize();
130130
}
131131

132132
llvm::LLVMInitializePasses();
133133

134134
// Use the legacy plugin registration if we don't use the new pass manager
135135
if !should_use_new_llvm_pass_manager(
136-
&sess.opts.debugging_opts.new_llvm_pass_manager,
136+
&sess.opts.unstable_opts.new_llvm_pass_manager,
137137
&sess.target.arch,
138138
) {
139139
// Register LLVM plugins by loading them into the compiler process.
140-
for plugin in &sess.opts.debugging_opts.llvm_plugins {
140+
for plugin in &sess.opts.unstable_opts.llvm_plugins {
141141
let lib = Library::new(plugin).unwrap_or_else(|e| bug!("couldn't load plugin: {}", e));
142142
debug!("LLVM plugin loaded successfully {:?} ({})", lib, plugin);
143143

@@ -541,7 +541,7 @@ fn backend_feature_name(s: &str) -> Option<&str> {
541541
}
542542

543543
pub fn tune_cpu(sess: &Session) -> Option<&str> {
544-
let name = sess.opts.debugging_opts.tune_cpu.as_ref()?;
544+
let name = sess.opts.unstable_opts.tune_cpu.as_ref()?;
545545
Some(handle_native(name))
546546
}
547547

0 commit comments

Comments
 (0)