Skip to content

Commit b14ff22

Browse files
committed
Remove FLANG_INCLUDE_RUNTIME
1 parent 2d38be5 commit b14ff22

File tree

12 files changed

+5
-451
lines changed

12 files changed

+5
-451
lines changed

flang/CMakeLists.txt

+2-29
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ if (LLVM_ENABLE_EH)
2323
endif()
2424

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

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

246-
set(FLANG_INCLUDE_RUNTIME_default ON)
247-
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
248-
set(FLANG_INCLUDE_RUNTIME_default OFF)
249-
endif ()
250-
option(FLANG_INCLUDE_RUNTIME "Build the runtime in-tree (deprecated; to be replaced with LLVM_ENABLE_RUNTIMES=flang-rt)" ${FLANG_INCLUDE_RUNTIME_default})
251-
if (FLANG_INCLUDE_RUNTIME)
252-
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
253-
message(WARNING "Building Flang-RT using LLVM_ENABLE_RUNTIMES. FLANG_INCLUDE_RUNTIME=${FLANG_INCLUDE_RUNTIME} ignored.")
254-
set(FLANG_INCLUDE_RUNTIME OFF)
255-
else ()
256-
message(STATUS "Building Flang-RT in-tree")
257-
endif ()
258-
else ()
259-
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
260-
message(STATUS "Building Flang-RT using LLVM_ENABLE_RUNTIMES")
261-
else ()
262-
message(STATUS "Not building Flang-RT. For a usable Fortran toolchain, either add LLVM_ENABLE_RUNTIMES=flang-rt, or compile a standalone Flang-RT.")
263-
endif ()
245+
if (NOT "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
246+
message(STATUS "Not building Flang-RT. For a usable Fortran toolchain, either add LLVM_ENABLE_RUNTIMES=flang-rt, or compile a standalone Flang-RT.")
264247
endif ()
265248

266249
set(FLANG_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
@@ -485,12 +468,6 @@ if (FLANG_INCLUDE_TESTS)
485468
add_compile_definitions(FLANG_INCLUDE_TESTS=1)
486469
endif()
487470

488-
option(FLANG_CUF_RUNTIME
489-
"Compile CUDA Fortran runtime sources" OFF)
490-
if (FLANG_CUF_RUNTIME)
491-
find_package(CUDAToolkit REQUIRED)
492-
endif()
493-
494471
add_subdirectory(include)
495472
add_subdirectory(lib)
496473
add_subdirectory(cmake/modules)
@@ -501,10 +478,6 @@ if (FLANG_BUILD_TOOLS)
501478
add_subdirectory(tools)
502479
endif()
503480

504-
if (FLANG_INCLUDE_RUNTIME)
505-
add_subdirectory(runtime)
506-
endif ()
507-
508481
if (LLVM_INCLUDE_EXAMPLES)
509482
add_subdirectory(examples)
510483
endif()

flang/cmake/modules/AddFlangOffloadRuntime.cmake

-146
This file was deleted.

flang/examples/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
if (FLANG_INCLUDE_RUNTIME)
2-
add_subdirectory(ExternalHelloWorld)
3-
endif ()
41
add_subdirectory(PrintFlangFunctionNames)
52
add_subdirectory(FlangOmpReport)
63
add_subdirectory(FeatureList)

flang/examples/ExternalHelloWorld/CMakeLists.txt

-9
This file was deleted.

flang/runtime/CUDA/CMakeLists.txt

-43
This file was deleted.

0 commit comments

Comments
 (0)