1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From b0e5390d0b2add2eb33496dc465e0ab360995d15 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 17 Nov 2023 23:20:58 +0100
Subject: [PATCH] Revert "Never implicitly add rpaths for each lib dir, add
NixOS libdir to rpath"
This reverts commit 6fd7c2993044b2f6f43af1c640c11be22eca426c.
---
lib/std/zig/system/NativePaths.zig | 1 -
src/Compilation.zig | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig
index 4c8f1286b..cfa567f4b 100644
--- a/lib/std/zig/system/NativePaths.zig
+++ b/lib/std/zig/system/NativePaths.zig
@@ -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;
diff --git a/src/Compilation.zig b/src/Compilation.zig
index a08c3e09f..1c73f8467 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1542,7 +1542,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,
--
2.41.0
|