Skip to content

Commit

Permalink
Undo leftover change of moving module_files to FortranRuntime
Browse files Browse the repository at this point in the history
  • Loading branch information
Meinersbur committed Oct 10, 2024
1 parent 9f37b91 commit 7123f2c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions llvm/runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,17 @@ if(build_runtimes)
endif()

if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
if (LLVM_TOOL_FLANG_BUILD AND "FortranRuntime" IN_LIST LLVM_ENABLE_PROJECTS)
set(enable_fortran ENABLE_FORTRAN)
endif ()
if (${LLVM_TOOL_FLANG_BUILD})
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang-new")
set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang-new")
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
# TODO: This is a workaround until flang becomes a first-class project
# in llvm/CMakeList.txt. Until then, this line ensures that flang-new is
# built before "openmp" is built as a runtime project. Besides "flang-new"
# to build the compiler, we also need to add "module_files" to make sure
# that all .mod files are also properly build.
list(APPEND extra_deps "flang-new" "module_files")
endif()
foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)
if(TARGET ${dep})
list(APPEND extra_deps ${dep})
Expand Down

0 comments on commit 7123f2c

Please sign in to comment.