authorgravatar for sentrycraft123@gmail.comJan200101 <sentrycraft123@gmail.com> 2023-06-07 12:44:27+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-13 11:11:10-07:00
logd7b73af8f65bb891c8700ed47777144bb6f35fe1
treeef656afc1e0813cc0dedb29d6390f3b3d6a8f03a
parentc76ce25a6165e96015b11d506e3c968c6c8dca2c

Never implicitly add rpaths for each lib dir, add NixOS libdir to rpath


2 files changed, 2 insertions(+), 1 deletions(-)

lib/std/zig/system/NativePaths.zig+1
......@@ -74,6 +74,7 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths
7474 } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') {
7575 const lib_path = word[2..];
7676 try self.addLibDir(lib_path);
77 try self.addRPath(lib_path);
7778 } else {
7879 try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word});
7980 break;
src/Compilation.zig+1-1
......@@ -1521,7 +1521,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
15211521 .llvm_cpu_features = llvm_cpu_features,
15221522 .skip_linker_dependencies = options.skip_linker_dependencies,
15231523 .parent_compilation_link_libc = options.parent_compilation_link_libc,
1524 .each_lib_rpath = options.each_lib_rpath orelse options.is_native_os,
1524 .each_lib_rpath = options.each_lib_rpath orelse false,
15251525 .build_id = build_id,
15261526 .cache_mode = cache_mode,
15271527 .disable_lld_caching = options.disable_lld_caching or cache_mode == .whole,