r335810 - Handle both Linux and Windows path separator for the resource dir

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 27 20:54:08 PDT 2018


Author: phosek
Date: Wed Jun 27 20:54:08 2018
New Revision: 335810

URL: http://llvm.org/viewvc/llvm-project?rev=335810&view=rev
Log:
Handle both Linux and Windows path separator for the resource dir

The resource dir path used for the multiarch runtimes support is
constructed in a platform independent way and therefore will use
native path separators on each platform. We need to make sure that
the per target runtime directory test handles both to not fail
when the test is being executed on Windows.

Modified:
    cfe/trunk/test/Driver/linux-per-target-runtime-dir.c

Modified: cfe/trunk/test/Driver/linux-per-target-runtime-dir.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-per-target-runtime-dir.c?rev=335810&r1=335809&r2=335810&view=diff
==============================================================================
--- cfe/trunk/test/Driver/linux-per-target-runtime-dir.c (original)
+++ cfe/trunk/test/Driver/linux-per-target-runtime-dir.c Wed Jun 27 20:54:08 2018
@@ -12,10 +12,10 @@
 // CHECK-PER-TARGET-RUNTIME: "-internal-isystem" "[[RESDIR]]/include/c++/v1"
 // CHECK-PER-TARGET-RUNTIME: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
 // CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]"
-// CHECK-PER-TARGET-RUNTIME: "-L[[RESDIR]]/x86_64-linux-gnu/lib"
+// CHECK-PER-TARGET-RUNTIME: "-L[[RESDIR]]{{/|\\\\}}x86_64-linux-gnu{{/|\\\\}}lib"
 
 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
 // RUN:     --target=x86_64-linux-gnu \
 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-X8664 %s
-// CHECK-CLANGRT-X8664: x86_64-linux-gnu/lib/libclang_rt.builtins.a
+// CHECK-CLANGRT-X8664: x86_64-linux-gnu{{/|\\\\}}lib{{/|\\\\}}libclang_rt.builtins.a




More information about the cfe-commits mailing list