Skip to content

Commit 384dd9d

Browse files
committed
[libc++] Run substitutes-in-compile-flags.sh.cpp test on Windows.
Fix for substitutes-in-compile-flags.sh.cpp to run it properly on Windows platform. Differential Revision: https://reviews.llvm.org/D102048
1 parent f90abac commit 384dd9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
//===----------------------------------------------------------------------===//
88

99
// This test greps for %t, which is expanded to a path with backslashes. When
10-
// that is passed to grep, those backslashes would have to be escaped, which we
11-
// don't do right now.
12-
// UNSUPPORTED: windows
10+
// that is passed to grep, those backslashes must be escaped. We escape those
11+
// within the pattern into a file and use this file with 'grep'.
1312

1413
// Make sure that substitutions are performed inside additional compiler flags.
1514

1615
// ADDITIONAL_COMPILE_FLAGS: -I %t.1
1716
// ADDITIONAL_COMPILE_FLAGS: -isystem %t.2 , -isysroot %t.3
18-
// RUN: echo "%{compile_flags}" | grep -e '-I %t.1 -isystem %t.2 -isysroot %t.3'
17+
// RUN: echo "-I %t.1 -isystem %t.2 -isysroot %t.3" | sed "s/\\\/\\\\\\\/g" > %t.escaped.grep
18+
// RUN: echo "%{compile_flags}" | grep -e -f %t.escaped.grep

0 commit comments

Comments
 (0)