From 5ae88e919b2e1e0a519fda1e49c8e83e139cba40 Mon Sep 17 00:00:00 2001 From: S0urc3C0de Date: Sun, 2 Aug 2020 13:55:01 +0200 Subject: [PATCH] Add rdynamic option to build.zig --- lib/std/build.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/std/build.zig b/lib/std/build.zig index 0fa6ecf1ea..103d3a3193 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1151,6 +1151,7 @@ pub const LibExeObjStep = struct { bundle_compiler_rt: bool, disable_stack_probing: bool, disable_sanitize_c: bool, + rdynamic: bool, c_std: Builder.CStd, override_lib_dir: ?[]const u8, main_pkg_path: ?[]const u8, @@ -1311,6 +1312,7 @@ pub const LibExeObjStep = struct { .bundle_compiler_rt = false, .disable_stack_probing = false, .disable_sanitize_c = false, + .rdynamic = false, .output_dir = null, .single_threaded = false, .installed_path = null, @@ -1994,6 +1996,9 @@ pub const LibExeObjStep = struct { if (self.disable_sanitize_c) { try zig_args.append("-fno-sanitize-c"); } + if (self.rdynamic) { + try zig_args.append("-rdynamic"); + } if (self.code_model != .default) { try zig_args.append("-code-model");