[flang-commits] [flang] 1256d1d - [flang] Add dependency to all runtime types to main target on Windows

David Truby via flang-commits flang-commits at lists.llvm.org
Tue Nov 14 06:25:12 PST 2023


Author: David Truby
Date: 2023-11-14T14:24:50Z
New Revision: 1256d1d17e8668582a923cb36b6bc9b31034d7f7

URL: https://github.com/llvm/llvm-project/commit/1256d1d17e8668582a923cb36b6bc9b31034d7f7
DIFF: https://github.com/llvm/llvm-project/commit/1256d1d17e8668582a923cb36b6bc9b31034d7f7.diff

LOG: [flang] Add dependency to all runtime types to main target on Windows

This patch fixes a small bug where the new flang runtime types for
Windows (static, static_dbg, etc) are not built when the FortranRuntime
is requested by adding the missing dependency.

Added: 
    

Modified: 
    flang/lib/Decimal/CMakeLists.txt
    flang/runtime/CMakeLists.txt
    flang/runtime/FortranMain/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/lib/Decimal/CMakeLists.txt b/flang/lib/Decimal/CMakeLists.txt
index febc9ef7ee51b42..2f6caa22e1562b8 100644
--- a/flang/lib/Decimal/CMakeLists.txt
+++ b/flang/lib/Decimal/CMakeLists.txt
@@ -75,4 +75,6 @@ if (DEFINED MSVC)
     binary-to-decimal.cpp
     decimal-to-binary.cpp
   )
+  add_dependencies(FortranDecimal FortranDecimal.static FortranDecimal.dynamic
+    FortranDecimal.static_dbg FortranDecimal.dynamic_dbg)
 endif()
\ No newline at end of file

diff  --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index 575c5bcf0a25508..68ae97bed4e329e 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -308,4 +308,6 @@ else()
     LINK_LIBS
     FortranDecimal.dynamic_dbg
     INSTALL_WITH_TOOLCHAIN)
+  add_dependencies(FortranRuntime FortranRuntime.static FortranRuntime.dynamic
+    FortranRuntime.static_dbg FortranRuntime.dynamic_dbg)
 endif()

diff  --git a/flang/runtime/FortranMain/CMakeLists.txt b/flang/runtime/FortranMain/CMakeLists.txt
index 2e3c68f1c331bf5..deb7bd10acf512d 100644
--- a/flang/runtime/FortranMain/CMakeLists.txt
+++ b/flang/runtime/FortranMain/CMakeLists.txt
@@ -18,4 +18,6 @@ if (DEFINED MSVC)
   add_flang_library(Fortran_main.dynamic_dbg STATIC INSTALL_WITH_TOOLCHAIN
     Fortran_main.c
   )
+  add_dependencies(Fortran_main Fortran_main.static Fortran_main.dynamic
+    Fortran_main.static_dbg Fortran_main.dynamic_dbg)
 endif()


        


More information about the flang-commits mailing list