clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separ...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Jun 2013 10:45:20 +0000 (10:45 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Jun 2013 10:45:20 +0000 (10:45 +0000)
    $ bin/clang.exe -print-file-name=include
    e:/path/to/build/bin\..\lib\clang\3.4\include

llvm-svn: 184930

clang/test/lit.cfg

index a357894..8024319 100644 (file)
@@ -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,