[PATCH] D78185: [flang] Use the equivalent compilation flags with MSVC.
مهدي شينون (Mehdi Chinoune) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 02:41:54 PDT 2020
ChinouneMehdi created this revision.
ChinouneMehdi added a reviewer: Flang.
ChinouneMehdi created this object with visibility "All Users".
ChinouneMehdi created this object with edit policy "Subscribers".
ChinouneMehdi added a project: Flang.
Herald added subscribers: llvm-commits, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78185
Files:
flang/CMakeLists.txt
Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -236,7 +236,11 @@
${FLANG_BINARY_DIR}/include/flang/Config/config.h)
# Add global F18 flags.
-set(CMAKE_CXX_FLAGS "-fno-rtti -fno-exceptions -pedantic -Wall -Wextra -Werror -Wcast-qual -Wimplicit-fallthrough -Wdelete-non-virtual-dtor ${CMAKE_CXX_FLAGS}")
+if(MSVC)
+ set(CMAKE_CXX_FLAGS "/GR- /EHs-c- /Wall ${CMAKE_CXX_FLAGS}")
+else()
+ set(CMAKE_CXX_FLAGS "-fno-rtti -fno-exceptions -pedantic -Wall -Wextra -Werror -Wcast-qual -Wimplicit-fallthrough -Wdelete-non-virtual-dtor ${CMAKE_CXX_FLAGS}")
+endif()
# Builtin check_cxx_compiler_flag doesn't seem to work correctly
macro(check_compiler_flag flag resultVar)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78185.257639.patch
Type: text/x-patch
Size: 776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/4a2dd3a5/attachment.bin>
More information about the llvm-commits
mailing list