[lit] Set shlibpath_var on AIX

Summary:
When building the `check-all` target on AIX, lit produces
```
warning: unable to inject shared library path on 'AIX'
```

This patch addresses this. `LIBPATH` is the environment variable of
interest on AIX. Newer versions of AIX may consider `LD_LIBRARY_PATH`,
but only when `LIBPATH` is unset.

Reviewers: xingxue, jasonliu, sfertile, serge-sans-paille

Reviewed By: xingxue

Subscribers: jsji, cfe-commits, llvm-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59741

llvm-svn: 357334
This commit is contained in:
Hubert Tong 2019-03-29 23:33:04 +00:00
parent 24168852e8
commit 5dc6a732e6
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ def find_shlibpath_var():
yield 'DYLD_LIBRARY_PATH'
elif platform.system() == 'Windows':
yield 'PATH'
elif platform.system() == 'AIX':
yield 'LIBPATH'
for shlibpath_var in find_shlibpath_var():
# in stand-alone builds, shlibdir is clang's build tree