Skip to content

Commit

Permalink
Rollup merge of #109526 - bzEq:aix-libpath, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
LIBPATH is used as dylib's path environment variable on AIX

See https://4js.com/online_documentation/fjs-fgl-3.00.05-manual-html/c_fgl_installation_017.html.
  • Loading branch information
matthiaskrgr committed Apr 3, 2023
2 parents 3328913 + d3cc2f7 commit 7192ef3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/dylib_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 7192ef3

Please sign in to comment.