aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2023-10-04 15:16:52 +0200
committerAndrew Kelley <andrew@ziglang.org>2023-10-04 11:21:56 -0700
commit8b4e3b6aee61a26e7229ea30728e6c5e31c7cd0b (patch)
treec78414c59ad23d9dd24b8989cced5589203370a2 /src/codegen
parenta306bfcd8eec166906ce2839bc7ff86ba6335376 (diff)
downloadzig-8b4e3b6aee61a26e7229ea30728e6c5e31c7cd0b.tar.gz
zig-8b4e3b6aee61a26e7229ea30728e6c5e31c7cd0b.zip
comp: add support for -fdata-sections
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig1
-rw-r--r--src/codegen/llvm/bindings.zig1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index b7943dd4aa..4355ac1191 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -955,6 +955,7 @@ pub const Object = struct {
reloc_mode,
code_model,
options.function_sections,
+ options.data_sections,
float_abi,
if (target_util.llvmMachineAbi(options.target)) |s| s.ptr else null,
);
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index 8b3470bbf2..bb68e28bf2 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -919,6 +919,7 @@ pub const TargetMachine = opaque {
Reloc: RelocMode,
CodeModel: CodeModel,
function_sections: bool,
+ data_sections: bool,
float_abi: ABIType,
abi_name: ?[*:0]const u8,
) *TargetMachine;