diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs index 69df7a2096c..5e153de04cc 100644 --- a/crates/cargo-util/src/paths.rs +++ b/crates/cargo-util/src/paths.rs @@ -55,6 +55,8 @@ pub fn dylib_path_envvar() -> &'static str { // penalty starting in 10.13. Cargo's testsuite ran more than twice as // slow with it on CI. "DYLD_FALLBACK_LIBRARY_PATH" + } else if cfg!(target_os = "aix") { + "LIBPATH" } else { "LD_LIBRARY_PATH" } diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index 95c4c87fbb9..353742877a4 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -274,6 +274,7 @@ on the platform: * Windows: `PATH` * macOS: `DYLD_FALLBACK_LIBRARY_PATH` * Unix: `LD_LIBRARY_PATH` +* AIX: `LIBPATH` The value is extended from the existing value when Cargo starts. macOS has special consideration where if `DYLD_FALLBACK_LIBRARY_PATH` is not already