aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-16 09:04:34 +0000
committer_ov4 <ov4@ov4.org>2026-10-16 09:04:34 +0000
commitb439592cf8113f34240095dcd6d8b6196c7d87c7 (patch)
tree7cf868c8d295d38a923efea48ff4dff8566295ee /cmake
parente7cd4478407fb0261ba8cec01381eb154d884d1f (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/NativeCompiler.cmake13
1 files changed, 7 insertions, 6 deletions
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()