aboutsummaryrefslogtreecommitdiff
path: root/lib/std/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/build.zig')
-rw-r--r--lib/std/build.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig
index 7e3c75bc78..88d416bee6 100644
--- a/lib/std/build.zig
+++ b/lib/std/build.zig
@@ -1239,6 +1239,7 @@ pub const LibExeObjStep = struct {
/// Create a .eh_frame_hdr section and a PT_GNU_EH_FRAME segment in the ELF
/// file.
link_eh_frame_hdr: bool = false,
+ link_emit_relocs: bool = false,
/// Place every function in its own section so that unused ones may be
/// safely garbage-collected during the linking phase.
@@ -2075,6 +2076,9 @@ pub const LibExeObjStep = struct {
if (self.link_eh_frame_hdr) {
try zig_args.append("--eh-frame-hdr");
}
+ if(self.link_emit_relocs){
+ try zig_args.append("-emit-relocs");
+ }
if (self.link_function_sections) {
try zig_args.append("-ffunction-sections");
}