mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 22:09:49 +00:00
stage1: Work around a small problem in LLVM API
The missing initializer for a single field in the TargetOptions class was enough to turn the stack protectors into hot garbage. Fixes #8408
This commit is contained in:
parent
4d729ebc87
commit
10c2b36444
@ -153,6 +153,11 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri
|
||||
}
|
||||
|
||||
TargetOptions opt;
|
||||
|
||||
// Work around the missing initialization of this field in the default
|
||||
// constructor. Use -1 so that the default value is used.
|
||||
opt.StackProtectorGuardOffset = (unsigned)-1;
|
||||
|
||||
opt.FunctionSections = function_sections;
|
||||
switch (float_abi) {
|
||||
case ZigLLVMABITypeDefault:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user