build main branch d053f55 from linux with:
git clone https://github.com/bytecodealliance/wasm-micro-runtime.git
mkdir wasm-micro-runtime/build
cd wasm-micro-runtime/build
cmake \
-DCMAKE_C_COMPILER=/opt/llvm/bin/clang \
-DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -stdlib=libc++" \
-DWAMR_BUILD_WAMRC=1 \
-DWAMR_BUILD_WITH_CUSTOM_LLVM=1 \
-DLLVM_DIR=/opt/llvm \
-LA ../wamr-compiler
make
./wamrc -v
: CommandLine Error: Option 'o' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted