[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 10 10:59:59 PDT 2023


phosek added inline comments.


================
Comment at: flang-rt/CMakeLists.txt:17-23
+# Check if flang-rt is built as a standalone project.
+if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR FLANG_RT_STANDALONE_BUILD)
+  project(FlangRT C CXX)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  set(FLANG_RT_STANDALONE_BUILD TRUE)
+  set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+endif()
----------------
I don't think we should support building FlangRT as a standalone project. We've been moving all runtimes to the runtimes build, the only leftover is compiler-rt and our hope is to address that soon.


================
Comment at: flang-rt/CMakeLists.txt:41-51
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
+  ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+  ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
----------------
None of this should be needed if building in the runtimes build.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154869



More information about the cfe-commits mailing list