zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit f4f5b2bc41e09ed68caf3c839433e44bd9b33249 (tree)
parent be56c67b1444632a719db2aac9a8476c2911b882
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date:   Wed, 24 Jul 2024 00:51:03 -0400

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.

Diffstat:
Msrc/zig_llvm.cpp | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp @@ -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) {