authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-26 21:21:29-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-26 21:22:33-07:00
logd43ebf562d852cb7a7ee983d8084584a53d185ee
tree77196b7a1dc6b8443a0fb705b453bd6324f5f803
parent755eeb7be0068f8a27aae1d5b8610c6c4da5162d

zig build: add each_lib_rpath property

Maps to `-feach-lib-rpath` and `-fno-each-lib-rpath`. Closes #8800

1 files changed, 9 insertions(+), 0 deletions(-)

lib/std/build.zig+9
......@@ -1487,6 +1487,7 @@ pub const LibExeObjStep = struct {
14871487 libc_file: ?FileSource = null,
14881488
14891489 valgrind_support: ?bool = null,
1490 each_lib_rpath: ?bool = null,
14901491
14911492 /// Create a .eh_frame_hdr section and a PT_GNU_EH_FRAME segment in the ELF
14921493 /// file.
......@@ -2681,6 +2682,14 @@ pub const LibExeObjStep = struct {
26812682 }
26822683 }
26832684
2685 if (self.each_lib_rpath) |each_lib_rpath| {
2686 if (each_lib_rpath) {
2687 try zig_args.append("-feach-lib-rpath");
2688 } else {
2689 try zig_args.append("-fno-each-lib-rpath");
2690 }
2691 }
2692
26842693 if (self.override_lib_dir) |dir| {
26852694 try zig_args.append("--zig-lib-dir");
26862695 try zig_args.append(builder.pathFromRoot(dir));