Skip to content

Commit e935a32

Browse files
Move some device compile flags to the call site
1 parent bde741a commit e935a32

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

offload/unittests/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function(add_offload_test_device_code test_filename test_name)
4040
OUTPUT ${output_file}
4141
COMMAND ${CMAKE_C_COMPILER}
4242
--target=nvptx64-nvidia-cuda -march=${nvptx_arch}
43-
-stdlib -nogpulib --cuda-path=${CUDA_ROOT} -flto -fno-builtin ${ARGN}
43+
-nogpulib --cuda-path=${CUDA_ROOT} -flto ${ARGN}
4444
${SRC_PATH} -o ${output_file}
4545
DEPENDS ${SRC_PATH}
4646
)
@@ -64,8 +64,7 @@ function(add_offload_test_device_code test_filename test_name)
6464
OUTPUT ${output_file}
6565
COMMAND ${CMAKE_C_COMPILER}
6666
--target=amdgcn-amd-amdhsa -mcpu=${amdgpu_arch}
67-
-stdlib -nogpulib -flto -fno-builtin ${ARGN}
68-
${SRC_PATH} -o ${output_file}
67+
-nogpulib -flto ${ARGN} ${SRC_PATH} -o ${output_file}
6968
DEPENDS ${SRC_PATH}
7069
)
7170
add_custom_target(${test_name}.amdgpu DEPENDS ${output_file})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
add_offload_test_device_code(LLVMLibm.c llvm-libm)
1+
add_offload_test_device_code(LLVMLibm.c llvm-libm -stdlib -fno-builtin)
22

33
set(OFFLOAD_CONFORMANCE_DEVICE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)

0 commit comments

Comments
 (0)