[libcxx-commits] [PATCH] D154582: [libcxx] Only add -GR- option to MSVC or clang-cl builds

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 6 14:23:45 PDT 2023


mstorsjo added inline comments.


================
Comment at: libcxx/CMakeLists.txt:572
   if (NOT LIBCXX_ENABLE_RTTI)
-    target_add_compile_flags_if_supported(${target} PUBLIC -GR-)
-    target_add_compile_flags_if_supported(${target} PUBLIC -fno-rtti)
+    if (LIBCXX_TARGETING_CLANG_CL OR LIBCXX_TARGETING_MSVC)
+      target_add_compile_flags_if_supported(${target} PUBLIC -GR-)
----------------
I'm late to the party here, but AFAIK we don't need to use these very libcxx specific cmake defines here - `if (MSVC)` is just enough as well; the cmake `MSVC` define is set for MSVC proper or any commandline compatible environment (icl, clang-cl).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154582/new/

https://reviews.llvm.org/D154582



More information about the libcxx-commits mailing list