Commit 9a6517e6 authored by Joseph Huber's avatar Joseph Huber
Browse files

[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.
parent 2a47f4ae
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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")