[libc-commits] [libc] [libc] Make `crt1.o` available to clang for GPU builds (PR #100599)
via libc-commits
libc-commits at lists.llvm.org
Thu Jul 25 13:00:59 PDT 2024
================
@@ -26,6 +26,16 @@ function(add_startup_object name)
PROPERTIES
OUTPUT_NAME ${name}.o
)
+
+ # Make an executable target of relocatable bitcode for clang if needed.
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+ add_executable(${fq_target_name}.exe $<TARGET_OBJECTS:${fq_target_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
+ "-flto" "-Wl,--lto-emit-llvm" "-march=sm_90")
----------------
lntue wrote:
Do you want to hard-code the `-march` here?
https://github.com/llvm/llvm-project/pull/100599
More information about the libc-commits
mailing list