[flang-commits] [flang] [Flang][runtime] Add dependency to build FortranRuntime after flang-new (PR #99737)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Fri Jul 19 21:46:26 PDT 2024


https://github.com/mjklemm created https://github.com/llvm/llvm-project/pull/99737

Makefile-based builds did not have proper dependencies to built the FortranRuntime target after Flang new is available.  This PR introduces a dependency to ensure that this is the case.  Relates to PR #95388.

>From b4702ccc8fa54a7fd36693db65f900d6bcd784cf Mon Sep 17 00:00:00 2001
From: Michael Klemm <michael.klemm at amd.com>
Date: Sat, 20 Jul 2024 06:42:49 +0200
Subject: [PATCH] [Flang][runtime] Add dependency to build FortranRuntime after
 flang-new

---
 flang/runtime/CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index 8588af7e16eec..6d435f00b8965 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -295,3 +295,9 @@ else()
     FortranRuntime.static_dbg FortranRuntime.dynamic_dbg)
 endif()
 set_target_properties(FortranRuntime PROPERTIES FOLDER "Flang/Runtime Libraries")
+
+# Add dependency to make sure that Fortran runtime library is being built after
+# we have the Flang compiler available.  This also includes the MODULE files
+# that compile when the 'flang-new' target is built.
+add_dependencies(FortranRuntime flang-new)
+



More information about the flang-commits mailing list