Skip to content
Snippets Groups Projects

Dockerfile definition and helper scripts related to preparing a toolchain image able to produce WASM binaries

Merged Bartek Wrona requested to merge bw_emscripten_toolchain_image into develop
All threads resolved!
9 files
+ 104
44
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 50
0
#! /bin/bash
echo "Building Boost..."
set -xeuo pipefail
TMP_SRC=${1:?"Missing arg #1 to specify source temp directory"}
INSTALL_PREFIX=${2:?"Missing arg #2 to specify prebuilt libraries install prefix"}
echo "Entering directory: ${TMP_SRC}/boost/tools/build"
cd "${TMP_SRC}/boost/tools/build"
# Clean local mods if any
git checkout .
# to fix ambigous generators specific to SEARCH_LIB
git apply /home/emscripten/scripts/emscripten_toolset.patch
rm -vrf "${TMP_SRC}/boost_build/"
mkdir -vp "${TMP_SRC}/boost_build/"
echo "Entering directory: ${TMP_SRC}/boost"
cd "${TMP_SRC}/boost"
./bootstrap.sh --without-icu --prefix="${INSTALL_PREFIX}"
printf "using clang : emscripten : emcc -s USE_ZLIB=1 -s USE_ICU=0 : <archiver>emar <ranlib>emranlib <linker>emlink <cxxflags>\"-std=c++11 -s USE_ICU=0\" ;" | tee -a ./project-config.jam >/dev/null
./b2 \
--build-dir="${TMP_SRC}/boost_build/" \
--prefix="${INSTALL_PREFIX}" \
-j "$(nproc)" \
-q \
runtime-link=static \
link=static \
toolset=clang-emscripten \
variant=release \
threading=single \
--with-atomic \
--with-chrono \
--with-date_time \
--with-filesystem \
--with-program_options \
--with-regex \
--with-system \
install
echo "Boost build finished."
\ No newline at end of file
Loading