Declare embedded LLVM bitcode section readonly.

This commit is contained in:
Michael Woerister 2018-04-16 14:27:37 +02:00
parent 427c548749
commit aed5b9c815

View File

@ -848,6 +848,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
};
llvm::LLVMSetSection(llglobal, section.as_ptr() as *const _);
llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage);
llvm::LLVMSetGlobalConstant(llglobal, llvm::True);
let llconst = C_bytes_in_context(llcx, &[]);
let llglobal = llvm::LLVMAddGlobal(