Skip to content

Commit a4d7f4c

Browse files
clean up more of llvm/runtimes/CMakeList.txt
1 parent e6f0430 commit a4d7f4c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

llvm/CMakeLists.txt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,8 @@ if(LIBC_GPU_BUILD)
186186
list(APPEND RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES "libc")
187187
endif()
188188

189-
set(NEED_LIBC_HDRGEN FALSE)
190-
if("libc" IN_LIST LLVM_ENABLE_RUNTIMES)
191-
set(NEED_LIBC_HDRGEN TRUE)
192-
endif()
193189
foreach(_name ${LLVM_RUNTIME_TARGETS})
194190
if("libc" IN_LIST RUNTIMES_${_name}_LLVM_ENABLE_RUNTIMES)
195-
set(NEED_LIBC_HDRGEN TRUE)
196191
if("${_name}" STREQUAL "amdgcn-amd-amdhsa" OR "${_name}" STREQUAL "nvptx64-nvidia-cuda")
197192
set(LLVM_LIBC_GPU_BUILD ON)
198193
endif()
@@ -202,26 +197,6 @@ if("${LIBC_TARGET_TRIPLE}" STREQUAL "amdgcn-amd-amdhsa" OR
202197
"${LIBC_TARGET_TRIPLE}" STREQUAL "nvptx64-nvidia-cuda")
203198
set(LLVM_LIBC_GPU_BUILD ON)
204199
endif()
205-
if(NEED_LIBC_HDRGEN)
206-
# To build the libc runtime, we need to be able to build few libc build
207-
# tools from the "libc" project. So, we add it to the list of enabled
208-
# projects.
209-
if (NOT "libc" IN_LIST LLVM_ENABLE_PROJECTS)
210-
message(STATUS "Enabling libc project to build libc build tools")
211-
list(APPEND LLVM_ENABLE_PROJECTS "libc")
212-
endif()
213-
endif()
214-
215-
foreach(proj IN LISTS LLVM_ENABLE_RUNTIMES)
216-
if("${proj}" IN_LIST LLVM_ENABLE_PROJECTS)
217-
# The 'libc' project bootstraps a few executables via the project build and
218-
# should not emit an error currently.
219-
if(NOT (NEED_LIBC_HDRGEN AND "${proj}" STREQUAL "libc"))
220-
message(FATAL_ERROR "Runtime project \"${proj}\" found in LLVM_ENABLE_PROJECTS and LLVM_ENABLE_RUNTIMES. It must only appear in one of them and that one should almost always be LLVM_ENABLE_RUNTIMES.")
221-
endif()
222-
endif()
223-
endforeach()
224-
unset(NEED_LIBC_HDRGEN)
225200

226201
# LLVM_ENABLE_PROJECTS_USED is `ON` if the user has ever used the
227202
# `LLVM_ENABLE_PROJECTS` CMake cache variable. This exists for

0 commit comments

Comments
 (0)