From 35726e909d44f41e090ac22e626bb4fa0e68afdb Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Thu, 23 Mar 2023 17:56:26 +0800 Subject: [PATCH 1/3] LIBPATH is used as dylib's path environment variable on AIX --- src/bootstrap/dylib_util.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/dylib_util.rs b/src/bootstrap/dylib_util.rs index 6d75272c50130..b14c0bed66c2c 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" } From b56fcb173bbf5ae0a52f26362639b7f2b922e7e9 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Tue, 28 Mar 2023 10:59:45 +0800 Subject: [PATCH 2/3] Set LIBPATH --- src/bootstrap/bootstrap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 013d1ab525b0c..d12781cc33af0 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -741,6 +741,9 @@ def build_bootstrap(self, color, verbose_count): 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) From d3cc2f76465b854129daa4dca2a10b137a8699bf Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Wed, 29 Mar 2023 14:55:30 +0800 Subject: [PATCH 3/3] Use LIBPATH in compiletest --- src/tools/compiletest/src/util.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 5f6a27e536638..748240cc94bc6 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" }