diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index cf5097e23a204..d5df27a2dcb43 100644 --- a/libc/cmake/modules/LLVMLibCObjectRules.cmake +++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake @@ -89,6 +89,7 @@ function(get_nvptx_compile_options output_var gpu_arch) set(nvptx_options "") list(APPEND nvptx_options "-march=${gpu_arch}") list(APPEND nvptx_options "-Wno-unknown-cuda-version") + list(APPEND nvptx_options "SHELL:-mllvm -nvptx-emit-init-fini-kernel=false") if(${gpu_arch} STREQUAL "sm_35") list(APPEND nvptx_options "--cuda-feature=+ptx60") elseif(${gpu_arch} STREQUAL "sm_37")