Closed
Description
I got this error when linking my example compiler against LLVMSwift and llvm@11 on my macOS 11 system:
duplicate symbol '_LLVMAddInternalizePassWithMustPreservePredicate' in:
/Users/.../Local/Swift/tigon/.build/x86_64-apple-macosx/debug/llvmshims.build/src/shim.cpp.o
/usr/local/Cellar/llvm/11.0.0_1/lib/libLLVMipo.a(IPO.cpp.o)
(Note: to try this I had to change LLVMSwift's Package.swift platforms attribute to .macOS(.v11))
I got round the duplicate symbol by commenting out the declaration and definition of LLVMAddInternalizePassWithMustPreservePredicate in shim.cpp. The resulting executable ran a minimal test OK.