准备环境
在本机搭建Linux环境_本地单机搭建linux系统-CSDN博客
法一
git clone https://github.com/mabels/icu.git
git checkout -b release-65-1
git diff -p wasm32-start..remotes/origin/wasm32 | patch -p1
cd icu4c/source
./runConfigureICU wasm32 --prefix=$PREFIX
法二
git clone https://github.com/unicode-org/icu
cd icu4c/source
emconfigure ./configure --prefix=$PWD/build --disable-draft --disable-extras --disable-icuio --disable-layoutex --disable-tests --disable-samples --enable-static --disable-shared --with-data-packaging=archive
#emconfigure ./configure --enable-static --prefix=/src/dist
#emconfigure ./configure --prefix=/opt/wasm --with-cross-build=`pwd` --enable-static=yes --enable-shared=no --target=wasm32-unknown-emscripten #--with-data-packaging=static --enable-icu-config --enable-extras=no --enable-tools=no --enable-samples=no --enable-tests=no && emmake make clean install
emmake make
效果
参考
https://github.com/mabels/wasm-icu