Skip to content

Commit

Permalink
Remove FLANG_INCLUDE_RUNTIME
Browse files Browse the repository at this point in the history
  • Loading branch information
Meinersbur committed Feb 21, 2025
1 parent 4c4fc46 commit 698bcd0
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 451 deletions.
31 changes: 2 additions & 29 deletions flang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ if (LLVM_ENABLE_EH)
endif()

set(FLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(FLANG_RT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../flang-rt")

if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE)
message(FATAL_ERROR "In-source builds are not allowed. \
Expand Down Expand Up @@ -243,24 +242,8 @@ else()
include_directories(SYSTEM ${MLIR_TABLEGEN_OUTPUT_DIR})
endif()

set(FLANG_INCLUDE_RUNTIME_default ON)
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
set(FLANG_INCLUDE_RUNTIME_default OFF)
endif ()
option(FLANG_INCLUDE_RUNTIME "Build the runtime in-tree (deprecated; to be replaced with LLVM_ENABLE_RUNTIMES=flang-rt)" ${FLANG_INCLUDE_RUNTIME_default})
if (FLANG_INCLUDE_RUNTIME)
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
message(WARNING "Building Flang-RT using LLVM_ENABLE_RUNTIMES. FLANG_INCLUDE_RUNTIME=${FLANG_INCLUDE_RUNTIME} ignored.")
set(FLANG_INCLUDE_RUNTIME OFF)
else ()
message(STATUS "Building Flang-RT in-tree")
endif ()
else ()
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
message(STATUS "Building Flang-RT using LLVM_ENABLE_RUNTIMES")
else ()
message(STATUS "Not building Flang-RT. For a usable Fortran toolchain, either add LLVM_ENABLE_RUNTIMES=flang-rt, or compile a standalone Flang-RT.")
endif ()
if (NOT "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
message(STATUS "Not building Flang-RT. For a usable Fortran toolchain, either add LLVM_ENABLE_RUNTIMES=flang-rt, or compile a standalone Flang-RT.")
endif ()

set(FLANG_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
Expand Down Expand Up @@ -474,12 +457,6 @@ if (FLANG_INCLUDE_TESTS)
add_compile_definitions(FLANG_INCLUDE_TESTS=1)
endif()

option(FLANG_CUF_RUNTIME
"Compile CUDA Fortran runtime sources" OFF)
if (FLANG_CUF_RUNTIME)
find_package(CUDAToolkit REQUIRED)
endif()

add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(cmake/modules)
Expand All @@ -490,10 +467,6 @@ if (FLANG_BUILD_TOOLS)
add_subdirectory(tools)
endif()

if (FLANG_INCLUDE_RUNTIME)
add_subdirectory(runtime)
endif ()

if (LLVM_INCLUDE_EXAMPLES)
add_subdirectory(examples)
endif()
Expand Down
146 changes: 0 additions & 146 deletions flang/cmake/modules/AddFlangOffloadRuntime.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions flang/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
if (FLANG_INCLUDE_RUNTIME)
add_subdirectory(ExternalHelloWorld)
endif ()
add_subdirectory(PrintFlangFunctionNames)
add_subdirectory(FlangOmpReport)
add_subdirectory(FeatureList)
9 changes: 0 additions & 9 deletions flang/examples/ExternalHelloWorld/CMakeLists.txt

This file was deleted.

43 changes: 0 additions & 43 deletions flang/runtime/CUDA/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 698bcd0

Please sign in to comment.