Implement Windows thread/mutex/cond APIs to support multi-thread (#627)

Implement Windows thread/mutex/cond related APIs to support Windows multi-thread feature
Change Windows HW boundary check implementation for multi-thread: change SEH to VEH
Fix wasm-c-api issue of getting AOTFunctionInstance by index, fix wasm-c-api compile warnings
Enable to build invokeNative_general.c with cmake variable
Fix several issues in lib-pthread
Disable two LLVM passes in multi-thread mode to reserve volatile semantic
Update docker script and document to build iwasm with Docker image

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-05-11 16:48:49 +08:00
committed by GitHub
parent 9710d9325f
commit 64b5459066
21 changed files with 1022 additions and 653 deletions

18
ci/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
FROM ubuntu:18.04
RUN apt update \
&& apt install -y apt-transport-https ca-certificates gnupg \
software-properties-common wget lsb-release curl build-essential
#
# CMAKE (https://apt.kitware.com/)
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& apt purge --auto-remove cmake \
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& apt update \
&& apt-get install -y kitware-archive-keyring \
&& rm /etc/apt/trusted.gpg.d/kitware.gpg \
&& apt-get install -y cmake

24
ci/build_wamr.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
docker build -t wamr_dev:0.1 -f Dockerfile . \
&& docker run --rm -it \
--name wamr_building \
--mount type=bind,src=$(realpath .)/..,dst=/source \
--workdir /source \
wamr_dev:0.1 \
/bin/bash -c "\
pushd product-mini/platforms/linux \
&& mkdir -p build \
&& pushd build \
&& rm -rf * \
&& cmake .. \
&& make \
&& popd \
&& popd \
&& echo 'Copying binary for image build' \
&& mkdir -p build_out \
&& rm build_out/* \
&& cp -f product-mini/platforms/linux/build/iwasm build_out/iwasm"