[MSVC] Don't add -nostdinc++ -isystem to runtimes builds
authorReid Kleckner <rnk@google.com>
Fri, 15 Jan 2021 20:35:42 +0000 (12:35 -0800)
committerReid Kleckner <rnk@google.com>
Fri, 15 Jan 2021 21:22:07 +0000 (13:22 -0800)
commit98c89ccfbd7467f946874c2af170d0f504355dd1
tree9ec5362fd133545021665c76b365b018da0e8510
parent6a42cbf6d2116b52cb59aa3e23bef93a30cf2dc8
[MSVC] Don't add -nostdinc++ -isystem to runtimes builds

If the host compiler is MSVC or clang-cl, then the compiler used to
buidl the runtimes will be clang-cl, and it doesn't support either of
those flags.

Worse, because -isystem is a space separated flag, it causes all cmake
try_compile tests to fail, so none of the -Wno-* flags make it to the
compiler in libcxx. I noticed that we weren't passing
-Wno-user-defined-literals to clang-cl and were getting warnings in the
build, and this fixes that for me.

Differential Revision: https://reviews.llvm.org/D94817
runtimes/CMakeLists.txt