[libc] Temporarily disable LTO flags for AMDGPU crt1.o

Summary:
Some recent changes seem to have introduced a bug that breaks this. Turn
it off while I triage it.
This commit is contained in:
Joseph Huber 2025-03-26 12:55:10 -05:00
parent 3e59b00eb5
commit 0106e5ad91

View File

@ -33,8 +33,14 @@ function(add_startup_object name)
set_target_properties(${fq_target_name}.exe PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR}
RUNTIME_OUTPUT_NAME ${name}.o)
target_link_options(${fq_target_name}.exe PRIVATE
"-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)
target_link_options(${fq_target_name}.exe PRIVATE
"-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
else()
target_link_options(${fq_target_name}.exe PRIVATE
"-r" "-nostdlib" "-Wl,--lto-emit-llvm")
endif()
endif()
endfunction()