| author | |
| committer | |
| log | f4f5b2bc41e09ed68caf3c839433e44bd9b33249 |
| tree | 27e0b314e63c8dd7d248a7e7f1fdd1a04042d2cf |
| parent | be56c67b1444632a719db2aac9a8476c2911b882 |
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.1 files changed, 1 insertions(+), 0 deletions(-)
src/zig_llvm.cpp+1| ... | @@ -129,6 +129,7 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri | ... | @@ -129,6 +129,7 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri |
| 129 | 129 | ||
| 130 | TargetOptions opt; | 130 | TargetOptions opt; |
| 131 | 131 | ||
| 132 | opt.UseInitArray = true; | ||
| 132 | opt.FunctionSections = function_sections; | 133 | opt.FunctionSections = function_sections; |
| 133 | opt.DataSections = data_sections; | 134 | opt.DataSections = data_sections; |
| 134 | switch (float_abi) { | 135 | switch (float_abi) { |