This is currently required when building MLIR with wild set as the linker via --ld-path unless the cmake build files are patched. See https://github.com/llvm/llvm-project/blob/main/mlir/lib/ExecutionEngine/CMakeLists.txt#L212
Here's the cmake configure command that I used:
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="--ld-path=wild" -DCMAKE_SHARED_LINKER_FLAGS="--ld-path=wild" -DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_ENABLE_CIR=ON -DCLANG_DEFAULT_LINKER=lld -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;mlir" -DLLVM_CCACHE_BUILD=ON -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" -S llvm -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_INCLUDE_TESTS=OFF
Also, -r (creating a relocatable object file) seems to be required for compiler-rt but I figured getting compiler-rt to link is less of a priority.
This is currently required when building MLIR with wild set as the linker via
--ld-pathunless the cmake build files are patched. See https://github.com/llvm/llvm-project/blob/main/mlir/lib/ExecutionEngine/CMakeLists.txt#L212Here's the cmake configure command that I used:
Also,
-r(creating a relocatable object file) seems to be required for compiler-rt but I figured getting compiler-rt to link is less of a priority.