Move versioned LLVM target creation to rustc_codegen_ssa
The OS version depends on the deployment target environment variables, the access of which we want to move to later in the compilation pipeline that has access to more information, for example `env_depinfo`.
This commit is contained in:
parent
20c909ff9c
commit
e1233153ac
12 changed files with 208 additions and 144 deletions
|
@ -3,6 +3,7 @@ use std::cell::{Cell, RefCell};
|
|||
use std::ffi::{CStr, c_uint};
|
||||
use std::str;
|
||||
|
||||
use rustc_codegen_ssa::back::versioned_llvm_target;
|
||||
use rustc_codegen_ssa::base::{wants_msvc_seh, wants_wasm_eh};
|
||||
use rustc_codegen_ssa::errors as ssa_errors;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
@ -177,7 +178,7 @@ pub(crate) unsafe fn create_module<'ll>(
|
|||
llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr());
|
||||
}
|
||||
|
||||
let llvm_target = SmallCStr::new(&sess.target.llvm_target);
|
||||
let llvm_target = SmallCStr::new(&versioned_llvm_target(sess));
|
||||
unsafe {
|
||||
llvm::LLVMRustSetNormalizedTarget(llmod, llvm_target.as_ptr());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue