From 9327f20ae2d2a81ebca8c43809f357311058644d Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Wed, 10 Mar 2021 16:08:50 +0800 Subject: [PATCH] Upgrade llvm version from 10.x to 11.x for wamrc and iwasm JIT (#564) Upgrade it as the latest version of wasi-sdk and emsdk are based on llvm-11, align to it to use the same compiler version. And this also fixes compilation error when building wamrc with llvm-10 in Windows platform. Signed-off-by: Wenyong Huang --- doc/build_wamr.md | 2 ++ product-mini/platforms/linux/build_llvm.sh | 2 +- wamr-compiler/build_llvm.py | 2 +- wamr-compiler/build_llvm.sh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/build_wamr.md b/doc/build_wamr.md index c18fbcb2..3ea47428 100644 --- a/doc/build_wamr.md +++ b/doc/build_wamr.md @@ -240,6 +240,8 @@ Make sure `MSVC` and `cmake` are installed and available in the command line env Then build the source codes: ``` Bash +cd core/deps/ +git clone https://github.com/nodejs/uvwasi.git cd product-mini/platforms/windows/ mkdir build cd build diff --git a/product-mini/platforms/linux/build_llvm.sh b/product-mini/platforms/linux/build_llvm.sh index 7821eeed..f4e4ee53 100755 --- a/product-mini/platforms/linux/build_llvm.sh +++ b/product-mini/platforms/linux/build_llvm.sh @@ -8,7 +8,7 @@ DEPS_DIR=${PWD}/../../../core/deps cd ${DEPS_DIR} if [ ! -d "llvm" ]; then echo "Clone llvm to core/deps/ .." - git clone --depth 1 --branch release/10.x https://github.com/llvm/llvm-project.git llvm + git clone --depth 1 --branch release/11.x https://github.com/llvm/llvm-project.git llvm fi cd llvm diff --git a/wamr-compiler/build_llvm.py b/wamr-compiler/build_llvm.py index d9912af2..34ae7b03 100644 --- a/wamr-compiler/build_llvm.py +++ b/wamr-compiler/build_llvm.py @@ -12,7 +12,7 @@ def clone_llvm(): llvm_dir = Path("llvm") if(llvm_dir.exists() == False): print("Clone llvm to core/deps/ ..") - for line in os.popen("git clone --branch release/10.x https://github.com/llvm/llvm-project.git llvm"): + for line in os.popen("git clone --branch release/11.x https://github.com/llvm/llvm-project.git llvm"): print(line) else: print("llvm source codes already existed") diff --git a/wamr-compiler/build_llvm.sh b/wamr-compiler/build_llvm.sh index 98f7a676..7960e364 100755 --- a/wamr-compiler/build_llvm.sh +++ b/wamr-compiler/build_llvm.sh @@ -8,7 +8,7 @@ DEPS_DIR=${PWD}/../core/deps cd ${DEPS_DIR} if [ ! -d "llvm" ]; then echo "Clone llvm to core/deps/ .." - git clone --depth 1 --branch release/10.x https://github.com/llvm/llvm-project.git llvm + git clone --depth 1 --branch release/11.x https://github.com/llvm/llvm-project.git llvm fi cd llvm