bolt/deps/llvm-18.1.8/libc/test/IntegrationTest/CMakeLists.txt
2025-02-14 19:21:04 +01:00

27 lines
738 B
CMake

if(LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
set(TEST_COMPILE_FLAGS
-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE}
-emit-llvm # AMDGPU's intermediate object file format is bitcode.
--target=${LIBC_GPU_TARGET_TRIPLE}
-mcode-object-version=${LIBC_GPU_CODE_OBJECT_VERSION} # Manually set the ABI.
)
elseif(LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
set(TEST_COMPILE_FLAGS
-march=${LIBC_GPU_TARGET_ARCHITECTURE}
--target=${LIBC_GPU_TARGET_TRIPLE}
--cuda-path=${LIBC_CUDA_ROOT}
)
endif()
add_object_library(
test
SRCS
test.cpp
COMPILE_OPTIONS
${TEST_COMPILE_FLAGS}
HDRS
test.h
DEPENDS
libc.src.__support.OSUtil.osutil
NO_GPU_BUNDLE # Compile this file directly without special GPU handling.
)