From 2cbac9c636eda3c260d4eb5b533db2f3252b4f65 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Mon, 9 Oct 2023 16:03:05 -0400 Subject: Fix checks --- compiler/rustc_codegen_gcc/src/base.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_gcc/src') diff --git a/compiler/rustc_codegen_gcc/src/base.rs b/compiler/rustc_codegen_gcc/src/base.rs index 61da38f4b0d..b081e9ff2fd 100644 --- a/compiler/rustc_codegen_gcc/src/base.rs +++ b/compiler/rustc_codegen_gcc/src/base.rs @@ -120,7 +120,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, target_info: Lock // NOTE: Rust relies on LLVM doing wrapping on overflow. context.add_command_line_option("-fwrapv"); - if tcx.sess.opts.cg.relocation_model == Some(rustc_target::spec::RelocModel::Static) { + if tcx.sess.relocation_model() == rustc_target::spec::RelocModel::Static { context.add_command_line_option("-mcmodel=kernel"); context.add_command_line_option("-fno-pie"); } -- cgit 1.4.1-3-g733a5