mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 08:33:15 +00:00
Revert "Never implicitly add rpaths for each lib dir, add NixOS libdir to rpath"
This reverts commit d7b73af8f65bb891c8700ed47777144bb6f35fe1. I did not look at this closely enough. This is incorrect; it should not implicitly add rpaths for every library, and it should not disable the nice default of each_lib_path when compiling for the native OS. See #16062 where we are working on a follow-up improvement to this.
This commit is contained in:
parent
470d887d80
commit
ae2cd5fe26
@ -61,7 +61,6 @@ pub fn detect(arena: Allocator, native_info: NativeTargetInfo) !NativePaths {
|
||||
} else if (word.len > 2 and word[0] == '-' and word[1] == 'L') {
|
||||
const lib_path = word[2..];
|
||||
try self.addLibDir(lib_path);
|
||||
try self.addRPath(lib_path);
|
||||
} else {
|
||||
try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word});
|
||||
break;
|
||||
|
||||
@ -1662,7 +1662,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
.llvm_cpu_features = llvm_cpu_features,
|
||||
.skip_linker_dependencies = options.skip_linker_dependencies,
|
||||
.parent_compilation_link_libc = options.parent_compilation_link_libc,
|
||||
.each_lib_rpath = options.each_lib_rpath orelse false,
|
||||
.each_lib_rpath = options.each_lib_rpath orelse options.is_native_os,
|
||||
.build_id = build_id,
|
||||
.cache_mode = cache_mode,
|
||||
.disable_lld_caching = options.disable_lld_caching or cache_mode == .whole,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user