r184930 - clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separator on MSYS bash.exe, since r184774.

NAKAMURA Takumi geek4civic at gmail.com
Wed Jun 26 03:45:20 PDT 2013


Author: chapuni
Date: Wed Jun 26 05:45:20 2013
New Revision: 184930

URL: http://llvm.org/viewvc/llvm-project?rev=184930&view=rev
Log:
clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separator on MSYS bash.exe, since r184774.

    $ bin/clang.exe -print-file-name=include
    e:/path/to/build/bin\..\lib\clang\3.4\include

Modified:
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=184930&r1=184929&r2=184930&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Jun 26 05:45:20 2013
@@ -193,7 +193,11 @@ def getClangBuiltinIncludeDir(clang):
                            stdout=subprocess.PIPE)
     if not cmd.stdout:
       lit.fatal("Couldn't find the include dir for Clang ('%s')" % clang)
-    return cmd.stdout.read().strip()
+    dir = cmd.stdout.read().strip()
+    if sys.platform in ['win32'] and execute_external:
+        # Don't pass dosish path separator to msys bash.exe.
+        dir = dir.replace('\\', '/')
+    return dir
 
 config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
                               % (config.clang,





More information about the cfe-commits mailing list