mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Extracts the compiler-rt linking block (builtins/sanitizer/XRay paths, -fno-sanitize-link-runtime, -fno-xray-link-deps, --whole-archive wiring into CMAKE_EXE_LINKER_FLAGS) into cmake/compiler_rt_link.cmake and includes it from both cmake/linux/default_libs.cmake and cmake/freebsd/default_libs.cmake. Both OSes now consistently link our in-tree compiler-rt runtimes; previously only Linux did, and FreeBSD sanitizer builds would have mixed our runtime with clang's auto-injected system runtime. The OS-specific bits that don't belong in the shared block — llvm-libc math dispatch, Android/musl libc variants, glibc-compatibility — stay in linux/default_libs.cmake. Addresses bot review comment on PR #102857.