Skip to content

Commit 9e84a22

Browse files
authored
[libc] Silence warnings when building GPU tests (#82701)
Summary: This patch silences two warnings that may occur during the building of GPU tests. These are not informative or helpful and just make the test output longer.
1 parent ac518c7 commit 9e84a22

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libc/cmake/modules/LLVMLibCCompileOptionRules.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ function(_get_hermetic_test_compile_options output_var flags)
158158
# The GPU build requires overriding the default CMake triple and architecture.
159159
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
160160
list(APPEND compile_options
161-
-nogpulib -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
161+
-Wno-multi-gpu -nogpulib -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
162162
-mcode-object-version=${LIBC_GPU_CODE_OBJECT_VERSION})
163163
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
164164
list(APPEND compile_options
165165
"SHELL:-mllvm -nvptx-emit-init-fini-kernel=false"
166-
--cuda-path=${LIBC_CUDA_ROOT}
166+
-Wno-multi-gpu --cuda-path=${LIBC_CUDA_ROOT}
167167
-nogpulib -march=${LIBC_GPU_TARGET_ARCHITECTURE} -fno-use-cxa-atexit)
168168
endif()
169169
set(${output_var} ${compile_options} PARENT_SCOPE)

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ function(add_integration_test test_name)
470470
# We need to use the internal object versions for NVPTX.
471471
set(internal_suffix ".__internal__")
472472
target_link_options(${fq_build_target_name} PRIVATE
473+
"-Wl,--suppress-stack-size-warning"
473474
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
474475
"--cuda-path=${LIBC_CUDA_ROOT}")
475476
elseif(LIBC_CC_SUPPORTS_NOSTDLIBPP)
@@ -650,6 +651,7 @@ function(add_libc_hermetic_test test_name)
650651
# We need to use the internal object versions for NVPTX.
651652
set(internal_suffix ".__internal__")
652653
target_link_options(${fq_build_target_name} PRIVATE
654+
"-Wl,--suppress-stack-size-warning"
653655
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
654656
"--cuda-path=${LIBC_CUDA_ROOT}")
655657
elseif(LIBC_CC_SUPPORTS_NOSTDLIBPP)

0 commit comments

Comments
 (0)