We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e59b00 commit 0106e5aCopy full SHA for 0106e5a
libc/startup/gpu/CMakeLists.txt
@@ -33,8 +33,14 @@ function(add_startup_object name)
33
set_target_properties(${fq_target_name}.exe PROPERTIES
34
RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR}
35
RUNTIME_OUTPUT_NAME ${name}.o)
36
- target_link_options(${fq_target_name}.exe PRIVATE
37
- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
+ # FIXME: A bug in the AMDGPU LTO pass is incorrectly removing the kernels.
+ if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
38
+ target_link_options(${fq_target_name}.exe PRIVATE
39
+ "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
40
+ else()
41
42
+ "-r" "-nostdlib" "-Wl,--lto-emit-llvm")
43
+ endif()
44
endif()
45
endfunction()
46
0 commit comments