Skip to content

Commit c5ed776

Browse files
author
Kai Luo
committed
AIX searches dynamic libraries in LIBPATH.
1 parent 3837689 commit c5ed776

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

crates/cargo-util/src/paths.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ pub fn dylib_path_envvar() -> &'static str {
5555
// penalty starting in 10.13. Cargo's testsuite ran more than twice as
5656
// slow with it on CI.
5757
"DYLD_FALLBACK_LIBRARY_PATH"
58+
} else if cfg!(target_os = "aix") {
59+
"LIBPATH"
5860
} else {
5961
"LD_LIBRARY_PATH"
6062
}

src/doc/src/reference/environment-variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ on the platform:
274274
* Windows: `PATH`
275275
* macOS: `DYLD_FALLBACK_LIBRARY_PATH`
276276
* Unix: `LD_LIBRARY_PATH`
277+
* AIX: `LIBPATH`
277278

278279
The value is extended from the existing value when Cargo starts. macOS has
279280
special consideration where if `DYLD_FALLBACK_LIBRARY_PATH` is not already

0 commit comments

Comments
 (0)