[PATCH] D27812: [test] Extend llvm_shlib_dir fix to unittests

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 12:41:42 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL289865: [test] Extend llvm_shlib_dir fix to unittests (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D27812?vs=81587&id=81635#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27812

Files:
  cfe/trunk/test/Unit/lit.cfg


Index: cfe/trunk/test/Unit/lit.cfg
===================================================================
--- cfe/trunk/test/Unit/lit.cfg
+++ cfe/trunk/test/Unit/lit.cfg
@@ -94,15 +94,16 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27812.81635.patch
Type: text/x-patch
Size: 1105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161215/32883f18/attachment.bin>


More information about the cfe-commits mailing list