mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
stage1: Store the specified code model in the LLVM module
This is needed for LTO builds to pick up the correct module. Closes #9132
This commit is contained in:
1 parent
b9e78593bb
commit
ccb6e1627e
3 files changed
+11
No files matched your search
@@ -969,6 +969,12 @@ void ZigLLVMSetModulePIELevel(LLVMModuleRef module) {
|
||||
unwrap(module)->setPIELevel(PIELevel::Level::Large);
|
||||
}
|
||||
|
||||
void ZigLLVMSetModuleCodeModel(LLVMModuleRef module, LLVMCodeModel code_model) {
|
||||
bool JIT;
|
||||
unwrap(module)->setCodeModel(*unwrap(code_model, JIT));
|
||||
assert(!JIT);
|
||||
}
|
||||
|
||||
static AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering Ordering) {
|
||||
switch (Ordering) {
|
||||
case LLVMAtomicOrderingNotAtomic: return AtomicOrdering::NotAtomic;
|
||||
|
||||
Reference in new issue
Block a user