Use correct section name for embedded LLVM bitcode on OSX.
This commit is contained in:
parent
54b0e07061
commit
d58ab3dbb8
@ -842,7 +842,11 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
|
||||
"rustc.embedded.module\0".as_ptr() as *const _,
|
||||
);
|
||||
llvm::LLVMSetInitializer(llglobal, llconst);
|
||||
let section = if cgcx.opts.target_triple.triple().contains("-ios") {
|
||||
|
||||
let is_apple = cgcx.opts.target_triple.triple().contains("-ios") ||
|
||||
cgcx.opts.target_triple.triple().contains("-darwin");
|
||||
|
||||
let section = if is_apple {
|
||||
"__LLVM,__bitcode\0"
|
||||
} else {
|
||||
".llvmbc\0"
|
||||
@ -858,7 +862,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
|
||||
"rustc.embedded.cmdline\0".as_ptr() as *const _,
|
||||
);
|
||||
llvm::LLVMSetInitializer(llglobal, llconst);
|
||||
let section = if cgcx.opts.target_triple.triple().contains("-ios") {
|
||||
let section = if is_apple {
|
||||
"__LLVM,__cmdline\0"
|
||||
} else {
|
||||
".llvmcmd\0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user