[libc-commits] [libc] [libc] Generate a stub for libpthread.a (PR #200908)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Mon Jun 8 01:58:43 PDT 2026
================
@@ -56,6 +56,29 @@ foreach(archive IN ZIP_LISTS
endif()
endforeach()
+# Add empty archive libraries for compatibility with systems expecting certain
+# bits of libc to be located in separate files (e.g. libpthread).
+if(LLVM_LIBC_FULL_BUILD)
+ set(dummy_source "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
----------------
kaladron wrote:
I'm not sure that portability matters much as I don't anticipate us providing this library outside of a full build.
Given that, would a linkerscript do the job?
set(LINKER_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/libpthread.a")
file(WRITE ${LINKER_SCRIPT} "INPUT(-lc)\n")
type of thing?
https://github.com/llvm/llvm-project/pull/200908
More information about the libc-commits
mailing list