We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4a5d57 + 0106e5a commit 59d5ec0Copy full SHA for 59d5ec0
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