Skip to content

Commit afa1feb

Browse files
authored
Update build wamrc aot compiler document (#570)
1 parent b06ae72 commit afa1feb

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,28 @@ WAMR supports building the iwasm VM core only (no app framework) to the mini pro
6060

6161
### Build wamrc AoT compiler
6262

63-
Both wasm binary file and AoT file are supported by iwasm. The wamrc AoT compiler is to compile wasm binary file to AoT file which can also be run by iwasm. Execute following commands to build **wamrc** compiler:
63+
Both wasm binary file and AoT file are supported by iwasm. The wamrc AoT compiler is to compile wasm binary file to AoT file which can also be run by iwasm. Execute following commands to build **wamrc** compiler for Linux:
6464

6565
```shell
6666
cd wamr-compiler
67-
./build_llvm.sh (use build_llvm_xtensa.sh instead to support xtensa target; use build_llvm.py for windows)
67+
./build_llvm.sh (or "./build_llvm_xtensa.sh" to support xtensa target)
6868
mkdir build && cd build
69-
cmake ..
69+
cmake .. (or "cmake .. -DWAMR_BUILD_TARGET=darwin" for MacOS)
7070
make
71-
ln -s {current path}/wamrc /usr/bin/wamrc
71+
# wamrc is generated under current directory
7272
```
73-
For MacOS, you should replace `cmake ..` with `cmake -DWAMR_BUILD_PLATFORM=darwin ..`.
7473

75-
For Windows you should replace `cmake ..` with `cmake -D WAMR_BUILD_PLATFORM=windows -A Win32 ..`.
74+
For **Windows**
75+
```shell
76+
cd wamr-compiler
77+
python build_llvm.py
78+
open LLVM.sln in wasm-micro-runtime\core\deps\llvm\win32build with Visual Studio
79+
build LLVM.sln Release
80+
mkdir build && cd build
81+
cmake ..
82+
cmake --build . --config Release
83+
# wamrc.exe is generated under .\Release directory
84+
```
7685

7786
Application framework
7887
===================================

0 commit comments

Comments
 (0)