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

Michael Kruse via flang-commits flang-commits at lists.llvm.org
Mon Jul 22 06:21:49 PDT 2024


================
@@ -295,3 +295,15 @@ else()
     FortranRuntime.static_dbg FortranRuntime.dynamic_dbg)
 endif()
 set_target_properties(FortranRuntime PROPERTIES FOLDER "Flang/Runtime Libraries")
+
+# If FortranRuntime is part of a Flang build (and not a separate build) then
+# 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.
+#
+# TODO: This is a workaround and should be updated when runtime build procedure
+# is changed to a regular runtime build.  See discussion in PR #95388.
+if (TARGET flang-new)
----------------
Meinersbur wrote:

[nit] 
```suggestion
if (TARGET flang-new AND TARGET module_files)
```
or remove `flang-new` dependency as transitive. At the end it only matters that `FORTRAN_MODULE_OBJECTS` files are available, not whether they have been compiled by `flang-new`.

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


More information about the flang-commits mailing list