Compare commits

...

7 Commits

Author SHA1 Message Date
139f0833e6 Add python3-dev
Add python3-dev
2021-10-15 20:20:08 +02:00
2b6cd4ae1d Merge pull request #620 from thewtex/wasi-cmake-platform
web-wasi: Patch CMake with WASI platform
2021-10-14 20:52:56 -04:00
1ec42ecb43 Merge pull request #619 from bensuperpc/update_scripts 2021-10-14 13:54:55 -04:00
ef0ff63ed9 web-wasi: Initialize WASI_SDK_PATH for wasi-sdk.cmake, set UNIX 2021-10-13 23:47:29 -04:00
93b23ec997 web-wasi: Patch CMake with WASI platform
WASI.cmake taken from the wasi-sdk repository.

To address the build time warning:

  System is unknown to cmake, create:
  Platform/WASI to use this system, please post your config file on
  discourse.cmake.org so it can be added to cmake
2021-10-13 15:41:28 -04:00
4f29f3d665 Disable auto pulling image in scripts
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-10-13 20:03:06 +02:00
749fb64f2d Update scripts
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-10-13 19:44:08 +02:00
8 changed files with 30 additions and 20 deletions

View File

@ -25,7 +25,7 @@ RUN \
ncurses-dev \
pkg-config \
pax \
python3 \
python3-dev \
python3-pip \
rsync \
sed \

View File

@ -1,5 +1,6 @@
FROM dockcross/base:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
# This is for ARMv5 "legacy" (armel) devices which do NOT support hard float
# VFP instructions (armhf).

View File

@ -1,15 +1,17 @@
#!/usr/bin/env bash
if (( $# >= 1 )); then
image=$1
build_file=build-${image%:*}
image_complet=$1
image=${image_complet%:*}
tag=${image_complet#*:}
build_file=build-$image
shift 1
cmake_arg=$@
cmake_arg=$*
echo "cmake arg: $cmake_arg"
# echo "Pulling dockcross/$image"
#docker pull dockcross/"$image"
# docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image"
@ -19,6 +21,6 @@ if (( $# >= 1 )); then
./dockcross-"$image" cmake -B "$build_file" -S . -G Ninja $cmake_arg
./dockcross-"$image" ninja -C "$build_file"
else
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <cmake arg.>"
echo "Usage: ${0##*/} <docker image (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <cmake arg.>"
exit 1
fi

View File

@ -1,14 +1,16 @@
#!/usr/bin/env bash
if (( $# >= 2 )); then
image=$1
image_complet=$1
image=${image_complet%:*}
tag=${image_complet#*:}
shift 1
command=$@
command=$*
echo "command: $command"
# echo "Pulling dockcross/$image"
#docker pull dockcross/"$image"
# docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image"

View File

@ -1,15 +1,17 @@
#!/usr/bin/env bash
if (( $# >= 1 )); then
image=$1
build_file=build-${image%:*}
image_complet=$1
image=${image_complet%:*}
tag=${image_complet#*:}
build_file=build-$image
shift 1
make_arg=$@
make_arg=$*
echo "make arg: $make_arg"
# echo "Pulling dockcross/$image"
#docker pull dockcross/"$image"
# docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image"
@ -18,6 +20,6 @@ if (( $# >= 1 )); then
echo "Build $build_file"
./dockcross-"$image" bash -c 'make CXX=${CXX} CC=${CC} AR=${AR} AS=${AS} LD=${LD} CPP=${CPP} FC=${FC} '"$make_arg"
else
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <make arg.>"
echo "Usage: ${0##*/} <docker image (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <make arg.>"
exit 1
fi

View File

@ -26,6 +26,8 @@ ENV AR=${CROSS_ROOT}/bin/llvm-ar \
CXX=clang++-wasi-sysroot.sh \
LD=${CROSS_ROOT}/bin/wasm-ld
COPY WASI.cmake /usr/src/
RUN mv /usr/src/WASI.cmake /usr/share/cmake-*/Modules/Platform/
COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake

View File

@ -1,5 +1,4 @@
set(WASI 1)
set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})

2
web-wasi/WASI.cmake Normal file
View File

@ -0,0 +1,2 @@
set(WASI 1)
set(UNIX 1)