Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update emscripten to latest 2.x release #12

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions f90wasm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ RUN git clone --single-branch --branch="release_33" --depth=1 https://github.com
# emscripten
RUN git clone --depth=1 https://github.com/emscripten-core/emsdk.git && \
cd emsdk && \
./emsdk install "2.0.12" && \
./emsdk activate "2.0.12"
./emsdk install "2.0.34" && \
./emsdk activate "2.0.34"
COPY scripts /app/scripts
ENV PATH="/app/bin:/app/scripts:/app/emsdk:/app/emsdk/node/14.18.2_64bit/bin:/app/emsdk/upstream/emscripten:${PATH}"

Expand Down Expand Up @@ -56,7 +56,7 @@ ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin
RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe" >> /etc/apt/sources.list && \
echo "deb http://security.ubuntu.com/ubuntu/ trusty-security main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get -y install --no-install-recommends python3 bash make cmake gfortran-4.6 llvm-3.3 ca-certificates && \
apt-get -y install --no-install-recommends python3 bash make cmake gfortran-4.6 llvm-3.3 ca-certificates libatomic1 && \
rm -rf /var/lib/apt/lists/*

COPY --from=build /app/bin /app/bin/
Expand Down
2 changes: 1 addition & 1 deletion f90wasm/scripts/emfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OUT=`echo "$@" | sed -n 's/.* -o \(.*\).*/\1/p' | cut -d " " -f1`
gfortran-4.6 -emit-llvm -S -flto -m32 -fverbose-asm -nostdlib -fplugin=/app/bin/dragonegg.so "$@" && \
sed -i 's/^\(target\sdatalayout\s*=\s*\).*$/\1"e-m:e-p:32:32-i64:64-n32:64-S128"/' "$OUT" && \
sed -i 's/^\(target\sdatalayout\s*=\s*\).*$/\1"e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-f128:64-S128"/' "$OUT" && \
sed -i 's/^\(target\striple\s*=\s*\).*$/\1"wasm32-unknown-emscripten"/' "$OUT" && \
llvm-as-3.3 "$OUT" -o "$OUT.bc" && \
mv "$OUT" "$OUT.ll" && \
Expand Down
2 changes: 1 addition & 1 deletion test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WLD:=emcc
FCFLAGS:=$(DEBUG) $(OPT) -Wall
CCFLAGS:=$(DEBUG) --target=wasm32-unknown-emscripten $(OPT) -c -flto -emit-llvm -m32 -Isrc -Wall -s WASM=1
EMSFLAGS:=$(OPT) $(DEBUG) -m32 -Wall -flto
WLDFLAGS:=-s WASM=1 -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -s MODULARIZE=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s 'EXPORT_NAME="createModule"'
WLDFLAGS:=-s WASM=1 -s EXPORTED_RUNTIME_METHODS=ccall,cwrap -s MODULARIZE=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s 'EXPORT_NAME="createModule"'
# -s USE_SDL=2 -s LEGACY_GL_EMULATION=1

# Project config
Expand Down