Skip to content

Commit 9a6517e

Browse files
committed
[libc][NFC] Do not emit init / fini kernels in NVPTX libc
Summray: A recent patch upgrades the NVPTX ctor / dtor lowering pass to emit kernels so other languages can call them. We do this manually in `libc` so we do not need this. Use the provided flag to disable this step to keep the created kernels cleaner.
1 parent 2a47f4a commit 9a6517e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/cmake/modules/LLVMLibCObjectRules.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function(get_nvptx_compile_options output_var gpu_arch)
8989
set(nvptx_options "")
9090
list(APPEND nvptx_options "-march=${gpu_arch}")
9191
list(APPEND nvptx_options "-Wno-unknown-cuda-version")
92+
list(APPEND nvptx_options "SHELL:-mllvm -nvptx-emit-init-fini-kernel=false")
9293
if(${gpu_arch} STREQUAL "sm_35")
9394
list(APPEND nvptx_options "--cuda-feature=+ptx60")
9495
elseif(${gpu_arch} STREQUAL "sm_37")

0 commit comments

Comments
 (0)