diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2016-11-15 12:54:10 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2016-11-15 12:54:10 +0000 |
| commit | 61c3046408976846f85af67b68bf82a6e8103c61 (patch) | |
| tree | 44498a0eb8c62791bf8b0b619a511687bd36f8c5 /clang | |
| parent | 1a7eec68a9b38314f01a8cd795d3eec92d996136 (diff) | |
| download | bcm5719-llvm-61c3046408976846f85af67b68bf82a6e8103c61.tar.gz bcm5719-llvm-61c3046408976846f85af67b68bf82a6e8103c61.zip | |
[test] Correctly include build llvm_shlib_dir in stand-alone builds
Add the build llvm_shlib_dir into LD_LIBRARY_PATH before the directory
specified as llvm_libs_dir, in order to fix stand-alone builds
attempting to use installed clang libraries.
In case of stand-alone builds llvm_libs_dir specifies the location of
installed LLVM libraries which can also contain an older version
(previous build) of clang libraries. Therefore, ensure to specify
llvm_shlib_dir (which is always the build tree path) before
the potentially-system llvm_libs_dir.
Differential Revision: https://reviews.llvm.org/D26115
llvm-svn: 286952
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/lit.cfg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg index 7695ea87b44..7d8bebf57ff 100644 --- a/clang/test/lit.cfg +++ b/clang/test/lit.cfg @@ -102,10 +102,15 @@ if clang_obj_root is not None: path = os.path.pathsep.join(( clang_tools_dir, llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path + # in stand-alone builds, llvm_shlib_dir is clang's build tree + # while llvm_libs_dir is installed LLVM (and possibly older clang) + llvm_shlib_dir = getattr(config, 'llvm_shlib_dir', None) + if not llvm_shlib_dir: + lit_config.fatal('No LLVM shlib dir set!') llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set!') - path = os.path.pathsep.join((llvm_libs_dir, + path = os.path.pathsep.join((llvm_shlib_dir, llvm_libs_dir, config.environment.get('LD_LIBRARY_PATH',''))) config.environment['LD_LIBRARY_PATH'] = path |

