aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index 5a776aea51..0af82b841e 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -82,7 +82,8 @@ static const bool assertions_on = false;
LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Triple,
const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc,
- LLVMCodeModel CodeModel, bool function_sections, ZigLLVMABIType float_abi, const char *abi_name)
+ LLVMCodeModel CodeModel, bool function_sections, bool data_sections, ZigLLVMABIType float_abi,
+ const char *abi_name)
{
std::optional<Reloc::Model> RM;
switch (Reloc){
@@ -130,6 +131,7 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri
TargetOptions opt;
opt.FunctionSections = function_sections;
+ opt.DataSections = data_sections;
switch (float_abi) {
case ZigLLVMABITypeDefault:
opt.FloatABIType = FloatABI::Default;