about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/bootstrap.py3
-rw-r--r--src/bootstrap/dylib_util.rs2
-rw-r--r--src/tools/compiletest/src/util.rs2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 013d1ab525b..d12781cc33a 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -741,6 +741,9 @@ class RustBuild(object):
         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
             (os.pathsep + env["LIBRARY_PATH"]) \
             if "LIBRARY_PATH" in env else ""
+        env["LIBPATH"] = os.path.join(self.bin_root(), "lib") + \
+            (os.pathsep + env["LIBPATH"]) \
+            if "LIBPATH" in env else ""
 
         # Export Stage0 snapshot compiler related env variables
         build_section = "target.{}".format(self.build)
diff --git a/src/bootstrap/dylib_util.rs b/src/bootstrap/dylib_util.rs
index 6d75272c501..b14c0bed66c 100644
--- a/src/bootstrap/dylib_util.rs
+++ b/src/bootstrap/dylib_util.rs
@@ -12,6 +12,8 @@ pub fn dylib_path_var() -> &'static str {
         "DYLD_LIBRARY_PATH"
     } else if cfg!(target_os = "haiku") {
         "LIBRARY_PATH"
+    } else if cfg!(target_os = "aix") {
+        "LIBPATH"
     } else {
         "LD_LIBRARY_PATH"
     }
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
index 5f6a27e5366..748240cc94b 100644
--- a/src/tools/compiletest/src/util.rs
+++ b/src/tools/compiletest/src/util.rs
@@ -156,6 +156,8 @@ pub fn dylib_env_var() -> &'static str {
         "DYLD_LIBRARY_PATH"
     } else if cfg!(target_os = "haiku") {
         "LIBRARY_PATH"
+    } else if cfg!(target_os = "aix") {
+        "LIBPATH"
     } else {
         "LD_LIBRARY_PATH"
     }