[libc++] Use -I instead of -isystem to include headers in the test suite

Using -isystem marks the headers as system headers, which means that we
don't actually get all the warnings that we'd normally get if we included
the headers as user headers.

The goal of the test suite is normally to mirror as closely as possible
how users would use the library. Technically, this change goes against
that philosophy, since users should be using `-isystem` (if they ever
need to specify the libc++ path explicitly, which should be a rare
occurence). However, I believe fishing out additional warnings from
the headers provides more value, hence this change. Ideally, we'd be
able to still use `-isystem`, but instruct Clang to still emit warnings
from the libc++ headers (e.g. we could tell Clang to emit warnings in
any file inside `<...>/usr/include/c++/v1`).

Reviewed By: #libc, ldionne, #libc_abi

Spies: Mordante, EricWF, mstorsjo, mgorny, aheejin, arichardson, philnik, jloser, libcxx-commits

Differential Revision: https://reviews.llvm.org/D118616

GitOrigin-RevId: bd44174547aaf0b491039a5a71d967e1471b6d87
diff --git a/test/configs/apple-libc++abi-backdeployment.cfg.in b/test/configs/apple-libc++abi-backdeployment.cfg.in
index 9239c55..06dd503 100644
--- a/test/configs/apple-libc++abi-backdeployment.cfg.in
+++ b/test/configs/apple-libc++abi-backdeployment.cfg.in
@@ -45,7 +45,7 @@
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -isystem %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-nostdinc++ -I %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',
diff --git a/test/configs/apple-libc++abi-shared.cfg.in b/test/configs/apple-libc++abi-shared.cfg.in
index 4d0df23..cf65ce4 100644
--- a/test/configs/apple-libc++abi-shared.cfg.in
+++ b/test/configs/apple-libc++abi-shared.cfg.in
@@ -6,7 +6,7 @@
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -isystem %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-nostdinc++ -I %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',
diff --git a/test/configs/ibm-libc++abi-shared.cfg.in b/test/configs/ibm-libc++abi-shared.cfg.in
index 06d9aca..64fc4f2 100644
--- a/test/configs/ibm-libc++abi-shared.cfg.in
+++ b/test/configs/ibm-libc++abi-shared.cfg.in
@@ -4,7 +4,7 @@
 
 config.substitutions.append(('%{flags}',''))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -isystem %{install}/include/c++/v1 ' + 
+    '-nostdinc++ -I %{install}/include/c++/v1 ' +
     '-D__LIBC_NO_CPP_MATH_OVERLOADS__ -DLIBCXXABI_NO_TIMER ' +
     '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'