[flang-commits] [PATCH] D124759: [flang] Install Fortran_main library

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri May 13 01:36:31 PDT 2022


rovka updated this revision to Diff 429163.
rovka edited the summary of this revision.
rovka added a comment.

Fixed. Thanks @dpalermo for investigating so promptly! :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124759/new/

https://reviews.llvm.org/D124759

Files:
  flang/cmake/modules/AddFlang.cmake
  flang/runtime/FortranMain/CMakeLists.txt


Index: flang/runtime/FortranMain/CMakeLists.txt
===================================================================
--- flang/runtime/FortranMain/CMakeLists.txt
+++ flang/runtime/FortranMain/CMakeLists.txt
@@ -1,3 +1,3 @@
-llvm_add_library(Fortran_main STATIC
+add_flang_library(Fortran_main STATIC
   Fortran_main.c
 )
Index: flang/cmake/modules/AddFlang.cmake
===================================================================
--- flang/cmake/modules/AddFlang.cmake
+++ flang/cmake/modules/AddFlang.cmake
@@ -18,7 +18,7 @@
 
 macro(add_flang_library name)
   cmake_parse_arguments(ARG
-    "SHARED"
+    "SHARED;STATIC"
     ""
     "ADDITIONAL_HEADERS"
     ${ARGN})
@@ -53,7 +53,7 @@
   else()
     # llvm_add_library ignores BUILD_SHARED_LIBS if STATIC is explicitly set,
     # so we need to handle it here.
-    if (BUILD_SHARED_LIBS)
+    if (BUILD_SHARED_LIBS AND NOT ARG_STATIC)
       set(LIBTYPE SHARED OBJECT)
     else()
       set(LIBTYPE STATIC OBJECT)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124759.429163.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220513/07c4b761/attachment.bin>


More information about the flang-commits mailing list