Skip to content

Commit eabe2eb

Browse files
authored
[libc] Remove special full build handling for GPU (#128572)
Summary: Currently we default to non-fullbuild for all targets, but realistically we should do this depending on the target OS. Some OS's like the GPU or upcoming UEFI have no existing hosted system, so they cannot be built with an overlay build. These are already errors so there's no reason to complicate things and require passing it in through the runtimes build.
1 parent baa77e3 commit eabe2eb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

libc/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ else()
128128
endif()
129129
endif()
130130

131-
option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc" OFF)
131+
# Some targets can only support the full build.
132+
set(default_to_full_build OFF)
133+
if(LIBC_TARGET_OS_IS_GPU)
134+
set(default_to_full_build ON)
135+
endif()
136+
137+
option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc" ${default_to_full_build})
132138
option(LLVM_LIBC_IMPLEMENTATION_DEFINED_TEST_BEHAVIOR "Build LLVM libc tests assuming our implementation-defined behavior" ON)
133139
option(LLVM_LIBC_ENABLE_LINTING "Enables linting of libc source files" OFF)
134140

llvm/runtimes/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,15 +535,13 @@ if(build_runtimes)
535535
"-DRUNTIMES_amdgcn-amd-amdhsa_LIBC_GPU_LOADER_EXECUTABLE=$<TARGET_FILE:amdhsa-loader>")
536536
list(APPEND extra_deps amdhsa-loader)
537537
endif()
538-
list(APPEND extra_cmake_args "-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_LIBC_FULL_BUILD=ON")
539538
endif()
540539
if("libc" IN_LIST RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES)
541540
if(TARGET nvptx-loader)
542541
list(APPEND extra_cmake_args
543542
"-DRUNTIMES_nvptx64-nvidia-cuda_LIBC_GPU_LOADER_EXECUTABLE=$<TARGET_FILE:nvptx-loader>")
544543
list(APPEND extra_deps nvptx-loader)
545544
endif()
546-
list(APPEND extra_cmake_args "-DRUNTIMES_nvptx64-nvidia-cuda_LLVM_LIBC_FULL_BUILD=ON")
547545
endif()
548546
if(TARGET clang-offload-packager)
549547
list(APPEND extra_deps clang-offload-packager)

0 commit comments

Comments
 (0)