llvm: force TargetOptions.UseInitArray to true

The `TargetOptions` default constructor initializes all `bool`s to
`false`, yet clang defaults to setting this option to `true`.  Since
recent glibc versions on linux do not appear to support this being set
to `false`, just changing the default for now unless a use case for
making it configurable is found.
This commit is contained in:
Jacob Young 2024-07-24 00:51:03 -04:00 committed by Andrew Kelley
parent be56c67b14
commit f4f5b2bc41

View File

@ -129,6 +129,7 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri
TargetOptions opt;
opt.UseInitArray = true;
opt.FunctionSections = function_sections;
opt.DataSections = data_sections;
switch (float_abi) {