mirror of
https://github.com/ziglang/zig.git
synced 2026-02-09 11:03:30 +00:00
Before, we would end up with the LLVM_LIBRARIES variable containing, for example, "-lLLVMAnalysis;-lz" and the Zig compiler CLI would be stuck with ambiguous library names. In this branch, that ambiguity is not allowed; it will look for a dynamically linked LLVMAnalysis and fail to find it in the case that the build of LLVM is static. With this change, LLVM_LIBRARIES will contain, for example, "/full/path/to/libLLVMAnalysis.a;-lz" and it is unambiguous that the first library should be linked statically and the second dynamically. In the case of a dynamically linked system LLVM, it will look like "/full/path/to/libLLVM.so;-lz" which again is fully unambiguous. This fixes building Zig from source.