mirror of
https://github.com/ziglang/zig.git
synced 2026-01-03 20:13:21 +00:00
fix llvm assertion failure when building std lib tests for macos
closes #1417
This commit is contained in:
parent
526338b00f
commit
8047f0eae2
@ -5821,6 +5821,7 @@ static void do_code_gen(CodeGen *g) {
|
||||
|
||||
LLVMSetLinkage(global_value, LLVMExternalLinkage);
|
||||
LLVMSetAlignment(global_value, var->align_bytes);
|
||||
LLVMSetGlobalConstant(global_value, var->gen_is_const);
|
||||
}
|
||||
} else {
|
||||
bool exported = (var->linkage == VarLinkageExport);
|
||||
@ -5841,9 +5842,9 @@ static void do_code_gen(CodeGen *g) {
|
||||
if (var->gen_is_const && var->value->type->id != TypeTableEntryIdFn) {
|
||||
gen_global_var(g, var, var->value->global_refs->llvm_value, var->value->type);
|
||||
}
|
||||
}
|
||||
|
||||
LLVMSetGlobalConstant(global_value, var->gen_is_const);
|
||||
LLVMSetGlobalConstant(global_value, var->gen_is_const);
|
||||
}
|
||||
|
||||
var->value_ref = global_value;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user