diff options
| author | Michael Goulet <michael@errs.io> | 2023-08-10 21:17:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-10 21:17:07 -0700 |
| commit | 94533d924e2735c64885ca35ff412d1f6e46efaf (patch) | |
| tree | 33077d386f36aa35755eae018455db29c93406e8 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 12551a5151e8de7bf8162455c8ec33651db6f5f9 (diff) | |
| parent | 907aa440cf51859b97dd0a1e25b6f15d344f4ebe (diff) | |
| download | rust-94533d924e2735c64885ca35ff412d1f6e46efaf.tar.gz rust-94533d924e2735c64885ca35ff412d1f6e46efaf.zip | |
Rollup merge of #114622 - petrochenkov:noplugin, r=oli-obk
rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt` Removes two pieces of mutable state. Follow up to https://github.com/rust-lang/rust/pull/114578.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index b4f7e20e05d..24fd5bbf8c5 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -209,7 +209,7 @@ pub unsafe fn create_module<'ll>( // PIE is potentially more effective than PIC, but can only be used in executables. // If all our outputs are executables, then we can relax PIC to PIE. if reloc_model == RelocModel::Pie - || sess.crate_types().iter().all(|ty| *ty == CrateType::Executable) + || tcx.crate_types().iter().all(|ty| *ty == CrateType::Executable) { llvm::LLVMRustSetModulePIELevel(llmod); } |
