# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/zig/hotfix-llvm-no-double-link.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Prevent zig from linking multiple times against llvm. See error message: [100%] Building stage3 : CommandLine Error: Option 'xcore-max-threads' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options - NoTag --- zig-0.12.0-dev.3193+4ba4f94c9/CMakeLists.txt.vanilla 2024-03-12 13:09:23.709407517 +0100 +++ zig-0.12.0-dev.3193+4ba4f94c9/CMakeLists.txt 2024-03-12 13:11:04.993351062 +0100 @@ -707,7 +707,7 @@ target_link_libraries(zigcpp LINK_PUBLIC ${CLANG_LIBRARIES} ${LLD_LIBRARIES} - ${LLVM_LIBRARIES} + LLVM ${CMAKE_THREAD_LIBS_INIT} )