[libc] Fix amdgpu startup code flags

Summary:
Currently AMDGPU only barely supports cross-TU ELF linking. Full linking
is usually done via LTO. This requires passing the architecture to the
link job. This is done automatically via `-flto` since D144505. Add this
to the link options.
This commit is contained in:
Joseph Huber 2023-02-22 11:36:12 -06:00
parent 24d144571d
commit 6641f8da73

View File

@ -15,4 +15,5 @@ add_startup_object(
get_fq_target_name(crt1 fq_name)
# Ensure that clang uses the correct linker for this object type.
target_link_libraries(${fq_name} PUBLIC "--target=${LIBC_GPU_TARGET_TRIPLE}")
target_link_libraries(${fq_name} PUBLIC
"--target=${LIBC_GPU_TARGET_TRIPLE}" "-flto")