RANLIB=llvm-ranlib AS="clang --target=wasm32-wasi -fuse-ld=lld --sysroot=$CROSSPATH/wasm32-wasi" CC="clang --target=wasm32-wasi -fuse-ld=lld --sysroot=$CROSSPATH/wasm32-wasi" CXX="clang++ --target=wasm32-wasi -fuse-ld=lld -fno-exceptions -fno-rtti -stdlib=libstdc++ --sysroot=$CROSSPATH/wasm32-wasi -nostdinc++" AR=llvm-ar LD=lld RA ../../../gcc/libstdc++-v3/configure --disable-nls --disable-werror --disable-libstdcxx-verbose --host=wasm32-wasi --disable-shared --prefix=$CROSSPATH/wasm32-wasi

cmake -GNinja ../../../llvm-project/runtimes -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DLLVM_ENABLE_LLD=On -DCMAKE_SYSTEM_NAME=wasi -DCMAKE_C_COMPILER_WORKS=On -DCMAKE_CXX_COMPILER_WORKS=On -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_ASM_COMPILER=clang -DCMAKE_C_COMPILER_TARGET=wasm32-wasi -DCMAKE_CXX_COMPILER_TARGET=wasm32-wasi -DCMAKE_ASM_COMPILER_TARGET=wasm32-wasi -DCMAKE_SYSROOT=$CROSSPATH/wasm32-wasi -DLIBCXXABI_SILENT_TERMINATE=On -DLIBCXX_HAS_MUSL_LIBC=On -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_HAS_WIN32_THREAD_API=Off -DLIBCXX_HAS_PTHREAD_API=Off -DLIBCXX_ENABLE_THREADS=Off -DLIBCXXABI_ENABLE_EXCEPTIONS=Off -DLIBCXXABI_ENABLE_SHARED=Off -DLIBCXXABI_ENABLE_THREADS=Off -DCMAKE_SYSROOT=$CROSSPATH/wasm32-wasi  -DCMAKE_LD=lld -DCMAKE_C_FLAGS="-fuse-ld=lld" -DCMAKE_CXX_FLAGS="-fuse-ld=lld" -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=Off -DLIBCXX_ENABLE_EXCEPTIONS=Off -DLIBCXXABI_ENABLE_EXCEPTIONS=Off -DLIBCXXABI_ENABLE_SHARED=Off -DLIBCXX_ENABLE_SHARED=Off -DLIBCXXABI_ENABLE_PIC=Off -DLIBCXXABI_LINK_TESTS=Off -DLIBCXX_INCLUDE_TESTS=Off -DLIBCXX_INCLUDE_BENCHMARKS=Off -DLIBCXX_ENABLE_RTTI=Off -DLIBCXXABI_ENABLE_RTTI=Off -DCMAKE_SYSTEM_NAME=WASI -DLIBCXX_INCLUDE_BENCHMARKS=Off -DLIBCXX_ENABLE_FILESYSTEM=Off -DCMAKE_INSTALL_PREFIX=$CROSSPATH/wasm32-wasi


要把llvm里的平台检查禁用掉