[libc-commits] [PATCH] D153586: [libc] Do not include GPU system libraries for integration tests

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 22 13:16:27 PDT 2023


jhuber6 created this revision.
jhuber6 added a reviewer: JonChesterfield.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
jhuber6 requested review of this revision.

These should have `-nogpulib` but do not inherit it from anywhere else.
Add it in to prevent it from being pulled in as these compilations are
supposed to be 100% freestanding.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153586

Files:
  libc/cmake/modules/LLVMLibCTestRules.cmake


Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -520,12 +520,12 @@
   # The GPU build requires overriding the default CMake triple and architecture.
   if(LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
     target_compile_options(${fq_build_target_name} PRIVATE
-                           -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE}
+                           -nogpulib -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE}
                            -flto --target=${LIBC_GPU_TARGET_TRIPLE})
   elseif(LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
     get_nvptx_compile_options(nvptx_options ${LIBC_GPU_TARGET_ARCHITECTURE})
     target_compile_options(${fq_build_target_name} PRIVATE
-                           ${nvptx_options} -fno-use-cxa-atexit
+                           ${nvptx_options} -nogpulib -fno-use-cxa-atexit
                            --target=${LIBC_GPU_TARGET_TRIPLE})
   endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153586.533757.patch
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230622/7dc30d05/attachment.bin>


More information about the libc-commits mailing list