diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2023-10-09 16:03:05 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-10-09 16:03:05 -0400 |
| commit | 22e6f6caafd79948c3d9edaa5e1507570e809d75 (patch) | |
| tree | e5a26bd2b2f00b130e1c4e03bdd22590b3a1a1dc | |
| parent | 242a482c88ea629b54a2d870e0d66738dd3900df (diff) | |
| download | rust-22e6f6caafd79948c3d9edaa5e1507570e809d75.tar.gz rust-22e6f6caafd79948c3d9edaa5e1507570e809d75.zip | |
Fix checks
| -rw-r--r-- | src/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base.rs b/src/base.rs index 61da38f4b0d..b081e9ff2fd 100644 --- a/src/base.rs +++ b/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"); } |
