Skip to content

Commit 0d63f13

Browse files
committed
Haiku: add missing cases of using LIBRARY_PATH
1 parent e1afddc commit 0d63f13

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/bootstrap/bootstrap.py

+3
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ def build_bootstrap(self):
367367
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
368368
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
369369
if "DYLD_LIBRARY_PATH" in env else ""
370+
env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
371+
(os.pathsep + env["LIBRARY_PATH"]) \
372+
if "LIBRARY_PATH" in env else ""
370373
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
371374
os.pathsep + env["PATH"]
372375
if not os.path.isfile(self.cargo()):

src/bootstrap/util.rs

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ pub fn dylib_path_var() -> &'static str {
139139
"PATH"
140140
} else if cfg!(target_os = "macos") {
141141
"DYLD_LIBRARY_PATH"
142+
} else if cfg!(target_os = "haiku") {
143+
"LIBRARY_PATH"
142144
} else {
143145
"LD_LIBRARY_PATH"
144146
}

src/librustc_back/dynamic_lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ impl DynamicLibrary {
6868
"PATH"
6969
} else if cfg!(target_os = "macos") {
7070
"DYLD_LIBRARY_PATH"
71+
} else if cfg!(target_os = "haiku") {
72+
"LIBRARY_PATH"
7173
} else {
7274
"LD_LIBRARY_PATH"
7375
}

src/tools/compiletest/src/procsrv.rs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub fn dylib_env_var() -> &'static str {
2020
"PATH"
2121
} else if cfg!(target_os = "macos") {
2222
"DYLD_LIBRARY_PATH"
23+
} else if cfg!(target_os = "haiku") {
24+
"LIBRARY_PATH"
2325
} else {
2426
"LD_LIBRARY_PATH"
2527
}

0 commit comments

Comments
 (0)