Author: mgorny Date: Thu Dec 15 14:31:08 2016 New Revision: 289865 URL: http://llvm.org/viewvc/llvm-project?rev=289865&view=rev Log: [test] Extend llvm_shlib_dir fix to unittests
Extend the fix from rL286952 to unittests. The fix added clang built library directories (via llvm_shlib_dir) to LD_LIBRARY_PATH. The previous logic has used llvm_libs_dir only which points to installed LLVM when doing stand-alone builds. The patch also removes the redundant win32 code that is no longer necessary now that shlibdir is used unconditionally. Differential Revision: https://reviews.llvm.org/D27812 Modified: cfe/trunk/test/Unit/lit.cfg Modified: cfe/trunk/test/Unit/lit.cfg URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Unit/lit.cfg?rev=289865&r1=289864&r2=289865&view=diff ============================================================================== --- cfe/trunk/test/Unit/lit.cfg (original) +++ cfe/trunk/test/Unit/lit.cfg Thu Dec 15 14:31:08 2016 @@ -94,15 +94,16 @@ elif platform.system() == 'Darwin': elif platform.system() == 'Windows': shlibpath_var = 'PATH' +# in stand-alone builds, shlibdir is clang's build tree +# while llvm_libs_dir is installed LLVM (and possibly older clang) +llvm_shlib_dir = getattr(config, 'shlibdir', None) +if not llvm_shlib_dir: + lit_config.fatal('No shlibdir set!') # Point the dynamic loader at dynamic libraries in 'lib'. llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set!') -shlibpath = os.path.pathsep.join((llvm_libs_dir, +shlibpath = os.path.pathsep.join((llvm_shlib_dir, llvm_libs_dir, config.environment.get(shlibpath_var,''))) -# Win32 seeks DLLs along %PATH%. -if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): - shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath)) - config.environment[shlibpath_var] = shlibpath _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits