Fix some compile issues of samples (#690)

Fix compile errors of workloads due to emsdk version upgrade,
enable BUILD_TARGET auto set for some samples,
and call wasm_runtime_init_thread_env() for in thread routine which
was created by pthread_create but not runtime in spawn-thread sample.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-08-06 18:12:21 +08:00
committed by GitHub
parent 541f577164
commit 0db04e0b8f
23 changed files with 902 additions and 304 deletions

View File

@ -4,19 +4,10 @@ RUN apt update \
&& apt install -y lsb-release software-properties-common build-essential \
wget curl git tree zip unzip
#
# install clang and llvm
# COPY llvm.sh /tmp
# RUN apt update \
# && apt install -y lsb-release wget software-properties-common build-essential \
# && cd /tmp \
# && chmod a+x llvm.sh \
# && ./llvm.sh 11
ARG WASI_SDK_VER=12
ARG WABT_VER=1.0.20
ARG WABT_VER=1.0.23
ARG CMAKE_VER=3.16.2
ARG BINARYEN_VER=version_97
ARG BINARYEN_VER=version_101
#
# install wasi-sdk
@ -52,8 +43,8 @@ RUN cd /opt \
&& git clone https://github.com/emscripten-core/emsdk.git \
&& cd emsdk \
&& git pull \
&& ./emsdk install latest \
&& ./emsdk activate latest \
&& ./emsdk install 2.0.12 \
&& ./emsdk activate 2.0.12 \
&& echo "source /opt/emsdk/emsdk_env.sh" >> /root/.bashrc
#
@ -73,6 +64,9 @@ RUN cd /opt/bazelisk/bin/ \
&& chmod a+x bazelisk \
&& ln -sf /opt/bazelisk/bin/bazelisk /usr/local/bin/bazel
RUN apt update \
&& apt install -y python2.7-minimal
#
# Clean up
RUN apt-get autoremove -y \