[flang-commits] [PATCH] D85355: [flang][msvc] Do not use gcc/clang command line options for msvc.
Michael Kruse via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Aug 5 13:24:22 PDT 2020
Meinersbur created this revision.
Meinersbur added reviewers: DavidTruby, sscalpone, isuruf, AlexisPerry, jeanPerier.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
Meinersbur requested review of this revision.
The command line options `-Wno-error` and `-Wno-unused-parameter` are specific to gcc/clang, do not use them when compiling with other compilers.
This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85355
Files:
flang/lib/Lower/CMakeLists.txt
flang/lib/Optimizer/CMakeLists.txt
Index: flang/lib/Optimizer/CMakeLists.txt
===================================================================
--- flang/lib/Optimizer/CMakeLists.txt
+++ flang/lib/Optimizer/CMakeLists.txt
@@ -1,4 +1,6 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-error")
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-error")
+endif ()
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
add_flang_library(FIROptimizer
Index: flang/lib/Lower/CMakeLists.txt
===================================================================
--- flang/lib/Lower/CMakeLists.txt
+++ flang/lib/Lower/CMakeLists.txt
@@ -1,4 +1,6 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-unused-parameter")
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-unused-parameter")
+endif ()
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
add_flang_library(FortranLower
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85355.283361.patch
Type: text/x-patch
Size: 992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200805/6fa99f5f/attachment.bin>
More information about the flang-commits
mailing list