[flang-commits] [flang] b46e254 - [flang] Fix fallout from varous changes to the cmake files.
Eric Schweitz via flang-commits
flang-commits at lists.llvm.org
Wed Jun 17 14:40:21 PDT 2020
Author: Eric Schweitz
Date: 2020-06-17T14:40:05-07:00
New Revision: b46e2548b67de40acf33b5dde95077698995576f
URL: https://github.com/llvm/llvm-project/commit/b46e2548b67de40acf33b5dde95077698995576f
DIFF: https://github.com/llvm/llvm-project/commit/b46e2548b67de40acf33b5dde95077698995576f.diff
LOG: [flang] Fix fallout from varous changes to the cmake files.
Differential revision: https://reviews.llvm.org/D82050
Added:
Modified:
flang/lib/Lower/CMakeLists.txt
flang/lib/Optimizer/CMakeLists.txt
flang/tools/tco/CMakeLists.txt
flang/unittests/Optimizer/CMakeLists.txt
Removed:
flang/lib/Optimizer/Dialect/CMakeLists.txt
flang/lib/Optimizer/Support/CMakeLists.txt
################################################################################
diff --git a/flang/lib/Lower/CMakeLists.txt b/flang/lib/Lower/CMakeLists.txt
index 8265025fafdc..8602c23cc578 100644
--- a/flang/lib/Lower/CMakeLists.txt
+++ b/flang/lib/Lower/CMakeLists.txt
@@ -1,4 +1,5 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-unused-parameter")
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
add_flang_library(FortranLower
ComplexExpr.cpp
@@ -9,9 +10,16 @@ add_flang_library(FortranLower
PFTBuilder.cpp
DEPENDS
- FIROpsIncGen
- MLIRControlFlowInterfaces
- MLIRLinalgOps
+ FIROptimizer
+ ${dialect_libs}
+
+ LINK_LIBS
+ FIROptimizer
+ ${dialect_libs}
+ MLIRAffineToStandard
+ MLIRLLVMIR
+ MLIRSCFToStandard
+ MLIRStandardOps
LINK_COMPONENTS
Support
diff --git a/flang/lib/Optimizer/CMakeLists.txt b/flang/lib/Optimizer/CMakeLists.txt
index 5825015fe60d..abeec930ae18 100644
--- a/flang/lib/Optimizer/CMakeLists.txt
+++ b/flang/lib/Optimizer/CMakeLists.txt
@@ -1,2 +1,26 @@
-add_subdirectory(Dialect)
-add_subdirectory(Support)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-error")
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+
+add_flang_library(FIROptimizer
+ Dialect/FIRAttr.cpp
+ Dialect/FIRDialect.cpp
+ Dialect/FIROps.cpp
+ Dialect/FIRType.cpp
+
+ Support/InternalNames.cpp
+ Support/KindMapping.cpp
+
+ DEPENDS
+ FIROpsIncGen
+ ${dialect_libs}
+
+ LINK_LIBS
+ ${dialect_libs}
+ MLIRTargetLLVMIR
+ MLIRTargetLLVMIRModuleTranslation
+
+ LINK_COMPONENTS
+ AsmParser
+ AsmPrinter
+ Remarks
+)
diff --git a/flang/lib/Optimizer/Dialect/CMakeLists.txt b/flang/lib/Optimizer/Dialect/CMakeLists.txt
deleted file mode 100644
index ef7f62518dac..000000000000
--- a/flang/lib/Optimizer/Dialect/CMakeLists.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
-
-add_flang_library(FIRDialect
- FIRAttr.cpp
- FIRDialect.cpp
- FIROps.cpp
- FIRType.cpp
-
- DEPENDS
- FIROpsIncGen
- ${dialect_libs}
-
- LINK_LIBS
- FIRSupport
- MLIRTargetLLVMIR
- MLIRTargetLLVMIRModuleTranslation
- MLIREDSC
- MLIRExecutionEngine
- MLIRParser
- MLIRSupport
- MLIRStandardToLLVM
- MLIRTransforms
-
- LINK_COMPONENTS
- AsmParser
- AsmPrinter
- Remarks
-)
diff --git a/flang/lib/Optimizer/Support/CMakeLists.txt b/flang/lib/Optimizer/Support/CMakeLists.txt
deleted file mode 100644
index 25cffb7d07fe..000000000000
--- a/flang/lib/Optimizer/Support/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
-
-add_flang_library(FIRSupport
- InternalNames.cpp
- KindMapping.cpp
-
- DEPENDS
- ${dialect_libs}
- LINK_LIBS
- ${dialect_libs}
-)
diff --git a/flang/tools/tco/CMakeLists.txt b/flang/tools/tco/CMakeLists.txt
index f893af2af51b..176ce8f42b6c 100644
--- a/flang/tools/tco/CMakeLists.txt
+++ b/flang/tools/tco/CMakeLists.txt
@@ -1,8 +1,7 @@
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
- FIRDialect
- FIRSupport
+ FIROptimizer
${dialect_libs}
MLIRIR
MLIRLLVMIR
diff --git a/flang/unittests/Optimizer/CMakeLists.txt b/flang/unittests/Optimizer/CMakeLists.txt
index 64f6e5364011..9e88a90756b3 100644
--- a/flang/unittests/Optimizer/CMakeLists.txt
+++ b/flang/unittests/Optimizer/CMakeLists.txt
@@ -1,7 +1,7 @@
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
- FIRDialect
+ FIROptimizer
${dialect_libs}
)
More information about the flang-commits
mailing list