diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-08-08 18:28:20 +0800 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-08-09 14:17:54 +0800 |
| commit | 0b89aac08d7190961544ced9e868cc20ce24d786 (patch) | |
| tree | 0aa4c283516f8f45d12396e9641f196149b55c8a /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 8838c73e866aa85b40463640ff6f5af268507812 (diff) | |
| download | rust-0b89aac08d7190961544ced9e868cc20ce24d786.tar.gz rust-0b89aac08d7190961544ced9e868cc20ce24d786.zip | |
rustc: Move `crate_types` from `Session` to `GlobalCtxt`
Removes a piece of mutable state. Follow up to #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); } |
