forked from bytecodealliance/wasm-micro-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial Dockerfile Dockerfile supports clang-8 and adds `iwasm` to `bin`. * Updated README with Docker instructions Added to Platform and app building section how to use the docker file to build the core and compile an app with clang.
- Loading branch information
1 parent
3f15fb3
commit 51ac31e
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Currently supports clang-8 compiler | ||
# Using the "test.c" app from the README.md: | ||
# clang-8 --target=wasm32 -O3 -Wl,--initial-memory=131072,--allow-undefined,--export=main,--no-threads,--strip-all,--no-entry -nostdlib -o test.wasm test.c | ||
# Pay attention to spacing above! ^ | ||
# iwasm test.wasm | ||
|
||
FROM ubuntu:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get install -y build-essential clang-8 cmake g++-multilib git lib32gcc-5-dev llvm-8 lld-8 nano | ||
|
||
WORKDIR /root | ||
|
||
RUN git clone https://github.com/intel/wasm-micro-runtime | ||
|
||
RUN cd wasm-micro-runtime/core/iwasm/products/linux/ && mkdir build && \ | ||
cd build && cmake .. && make | ||
|
||
RUN cd /usr/bin && ln -s wasm-ld-8 wasm-ld | ||
RUN cd /usr/bin && ln -s ~/wasm-micro-runtime/core/iwasm/products/linux/build/iwasm iwasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters