From b439592cf8113f34240095dcd6d8b6196c7d87c7 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 09:04:34 +0000 Subject: fix(build): build matching static LLD for macOS Build LLD from the installed LLVM version's official source release and install static archives into the local build prefix. Include the Mach-O unwind headers, preserve static library checks and document the setup. Co-Authored-By: Claude Fable 5.1 --- cmake/NativeCompiler.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cmake/NativeCompiler.cmake') diff --git a/cmake/NativeCompiler.cmake b/cmake/NativeCompiler.cmake index 29682ec..35c7f41 100644 --- a/cmake/NativeCompiler.cmake +++ b/cmake/NativeCompiler.cmake @@ -18,6 +18,13 @@ else() set(cpsc_linker_libraries lldELF) endif() +foreach(cpsc_native_library clangDriver ${cpsc_linker_libraries}) + get_target_property(cpsc_native_type ${cpsc_native_library} TYPE) + if(NOT cpsc_native_type STREQUAL "STATIC_LIBRARY") + message(FATAL_ERROR "Native output requires static ${cpsc_native_library}; found ${cpsc_native_type}. See doc/build.md for static dependency setup.") + endif() +endforeach() + set(cpsc_native_flags) get_filename_component(cpsc_lld_prefix "${LLD_DIR}/../../.." ABSOLUTE) if(APPLE) @@ -105,9 +112,3 @@ foreach(cpsc_import IN LISTS CLANG_EXPORTED_TARGETS LLD_EXPORTED_TARGETS LLVM_AV set_property(TARGET ${cpsc_import} PROPERTY INTERFACE_LINK_LIBRARIES "${cpsc_interface}") endif() endforeach() -foreach(cpsc_native_library clangDriver ${cpsc_linker_libraries}) - get_target_property(cpsc_native_type ${cpsc_native_library} TYPE) - if(NOT cpsc_native_type STREQUAL "STATIC_LIBRARY") - message(FATAL_ERROR "Native output requires static ${cpsc_native_library}") - endif() -endforeach() -- cgit v1.3.1-4-g156e