From: NAKAMURA Takumi Date: Fri, 4 Jul 2014 05:11:55 +0000 (+0000) Subject: Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c905855dff580543bece8bcecbb4850dcb2c5f4f;p=clang Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming. This makes unittests run with BUILD_SHARED_LIBS on DLL platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212316 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg index d34a01c9f9..4fa6e78ed6 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg @@ -100,4 +100,9 @@ if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set!') shlibpath = os.path.pathsep.join((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