Skip to content

Commit

Permalink
Fixed compilation after making binaryen a dependency for emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
trzecieu committed Jun 23, 2018
1 parent 755ce44 commit 10e03be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def compile_image(image_id):
continue

log("[INFO] Compiled [{tag}] in: {time}".format(tag=image_id, time=str(datetime.datetime.now() - t_start)), True)
return False if p.returncode else False
return False if p.returncode else True

def defer_push(image_name):
queue = open(QUEUE_FILE, 'r').read().splitlines(True) if os.path.isfile(QUEUE_FILE) else []
Expand Down
12 changes: 5 additions & 7 deletions docker/trzeci/emscripten-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ RUN echo "\n## Start building" \
&& echo "\n## Generate standard configuration" \
&& ./emsdk activate $EMSCRIPTEN_SDK \
&& ./emsdk construct_env > /dev/null \
&& sed -i -e 's/8.9.1_32bit/8.9.1_64bit/g' ~/.emscripten \
\
&& echo "\n## Re-Configure Emscripten" \
&& printf "import os\n" >> $EM_CONFIG \
Expand All @@ -76,6 +75,7 @@ RUN echo "\n## Start building" \
&& printf "TEMP_DIR='/tmp'\n" >> $EM_CONFIG \
&& printf "COMPILER_ENGINE=NODE_JS\n" >> $EM_CONFIG \
&& printf "JS_ENGINES=[NODE_JS]\n" >> $EM_CONFIG \
&& printf "BINARYEN_ROOT='$EMSDK/binaryen'\n" >> $EM_CONFIG \
&& cat $EM_CONFIG \
\
&& echo "\n## Move folders according to new structure" \
Expand All @@ -86,17 +86,15 @@ RUN echo "\n## Start building" \
&& mv $EMSDK/nodejs $EMSDK/node \
&& cat ~/.emscripten | sed -rn "s/EMSCRIPTEN_ROOT='(.*)'/\1/p" | xargs -i mv {} $EMSCRIPTEN \
&& cat ~/.emscripten | sed -rn "s/EMSCRIPTEN_NATIVE_OPTIMIZER='(.*)'/\1/p" | xargs dirname | xargs -i mv {} $EMSDK/optimizer \
\
&& mv $EMSDK/binaryen/*binaryen/bin $EMSDK/binaryen/bin \
&& find binaryen -maxdepth 1 -mindepth 1 ! -name 'bin' -type d -exec rm -fr {} \; \
\
&& rm -fr $EMSDK/emscripten \
&& rm -fr $EMSDK/clang \
&& rm -fr $EMSDK/emsdk_set_env.sh \
&& rm -fr ~/.emscripten* \
\
&& echo "\n## Compile Binaryen" \
&& $EMSCRIPTEN/embuilder.py build binaryen \
&& mkdir $EMSDK/binaryen \
&& mv $EM_PORTS/binaryen/binaryen-*/bin $EMSDK/binaryen/bin \
&& printf "BINARYEN_ROOT='$EMSDK/binaryen'\n" >> $EM_CONFIG \
\
&& echo "\n## Create links" \
&& for f in $EMSDK/llvm/clang/bin $EMSDK/node/bin $EMSDK/binaryen/bin $EMSDK/optimizer $EMSDK $EMSCRIPTEN; do \
find $f -maxdepth 1 -type f -executable | xargs -i bash -c 'ln -sf {} /usr/local/bin/$(basename {})'; \
Expand Down

0 comments on commit 10e03be

Please sign in to comment.