[flang-commits] [flang] 2f90e01 - [flang][driver] Add missing dependency in CMake files

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Thu Sep 24 01:32:54 PDT 2020


Author: Andrzej Warzynski
Date: 2020-09-24T09:32:16+01:00
New Revision: 2f90e01a963acc1a4db2fbdd1c7fcf1433955744

URL: https://github.com/llvm/llvm-project/commit/2f90e01a963acc1a4db2fbdd1c7fcf1433955744
DIFF: https://github.com/llvm/llvm-project/commit/2f90e01a963acc1a4db2fbdd1c7fcf1433955744.diff

LOG: [flang][driver] Add missing dependency in CMake files

The Flang driver depends on libclangBasic. This means, among other
things, that some of the tablegen files (e.g. diagnostic definitions)
need to be generated before various libclangBasic header files can be
included (e.g. DiagnosticIDs.h). If we are lucky, libclangBasic is
indeed built before various flang driver libraries that depend on it
are. This patch makes sure that this is deterministic - i.e.
libclangBasic is built before the Flang driver libraries are.

Differential Revision: https://reviews.llvm.org/D88110

Added: 
    

Modified: 
    flang/lib/Frontend/CMakeLists.txt
    flang/lib/FrontendTool/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/CMakeLists.txt b/flang/lib/Frontend/CMakeLists.txt
index fac3f955987f..fe74662c05ce 100644
--- a/flang/lib/Frontend/CMakeLists.txt
+++ b/flang/lib/Frontend/CMakeLists.txt
@@ -3,6 +3,9 @@ add_flang_library(flangFrontend
   CompilerInvocation.cpp
   FrontendOptions.cpp
 
+  DEPENDS
+  clangBasic
+
   LINK_LIBS
   clangBasic
   clangDriver

diff  --git a/flang/lib/FrontendTool/CMakeLists.txt b/flang/lib/FrontendTool/CMakeLists.txt
index eda040f7c716..db0349517af2 100644
--- a/flang/lib/FrontendTool/CMakeLists.txt
+++ b/flang/lib/FrontendTool/CMakeLists.txt
@@ -1,6 +1,9 @@
 add_flang_library(flangFrontendTool
   ExecuteCompilerInvocation.cpp
 
+  DEPENDS
+  clangBasic
+
   LINK_LIBS
   clangBasic
   clangDriver


        


More information about the flang-commits mailing list