Skip to content
Merged
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
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

59 changes: 22 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
*.diff

# autogenerated during the build
src/passes/WasmIntrinsics.cpp
/src/passes/WasmIntrinsics.cpp
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the effect of adding the leading / everywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC is just makes it a more precise match.

e.g.

*.o

vs

/*.o

The latter only match objects at the top level


# files generated by build-js.sh
WebIDLGrammar.pkl
glue.cpp
glue.js
parser.out
shared.bc
# File generated by build-js.sh
/out/

# autogenerated files by check.py
a.*
Expand All @@ -28,39 +24,28 @@ test/validator/*.wasm
*.map

# files related to building in-tree
CMakeFiles/
CMakeCache.txt
Makefile
cmake_install.cmake
*.ninja
.ninja_deps
.ninja_log
bin/wasm-shell
bin/wasm-opt
bin/asm2wasm
bin/wasm2asm
bin/wasm-as
bin/wasm-dis
bin/wasm-ctor-eval
bin/wasm-emscripten-finalize
bin/wasm-merge
bin/wasm-metadce
bin/wasm-reduce
bin/wasm2js
lib/
/CMakeFiles/
/CMakeCache.txt
/Makefile
/cmake_install.cmake
/*.ninja
/.ninja_deps
/.ninja_log
/bin/
/lib/

# files related to windows build
.vs/
*.vcxproj*
*.dir/
*.sln
*.sdf
*.VC.opendb
Win32/
# files related to bulding in-tree on windows
/.vs/
/*.vcxproj*
/*.dir/
/*.sln
/*.sdf
/*.VC.opendb
/Win32/

# macOS
.DS_Store

# files related to VS Code
.history
.vscode
/.history
/.vscode
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ INSTALL(FILES src/binaryen-c.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

# if binaryen.js was built (using "./build-js.sh", currently
# optional), install it
IF(EXISTS "${PROJECT_SOURCE_DIR}/bin/binaryen.js")
IF(EXISTS "${PROJECT_SOURCE_DIR}/out/binaryen.js")
INSTALL(FILES bin/binaryen.js DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
ENDIF()

Expand Down
1 change: 0 additions & 1 deletion bin/readme.txt

This file was deleted.

9 changes: 5 additions & 4 deletions build-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ BINARYEN_SRC="$(dirname $0)/src"
BINARYEN_SCRIPTS="$(dirname $0)/scripts"

# output binaries relative to current working directory
BINARYEN_BIN="$PWD/bin"
OUT="$PWD/out"

echo "generate embedded intrinsics module"

python $BINARYEN_SCRIPTS/embedwast.py $BINARYEN_SRC/passes/wasm-intrinsics.wast $BINARYEN_SRC/passes/WasmIntrinsics.cpp

echo "building shared bitcode"

mkdir -p ${OUT}
"$EMSCRIPTEN/em++" \
$EMCC_ARGS \
$BINARYEN_SRC/asmjs/asm_v_wasm.cpp \
Expand Down Expand Up @@ -168,7 +169,7 @@ echo "building shared bitcode"
$BINARYEN_SRC/wasm/wasm-validator.cpp \
$BINARYEN_SRC/wasm/wasm.cpp \
-I$BINARYEN_SRC \
-o shared.bc
-o ${OUT}/shared.bc

echo "building binaryen.js"

Expand Down Expand Up @@ -820,10 +821,10 @@ export_function "_BinaryenSetAPITracing"
"$EMSCRIPTEN/em++" \
$EMCC_ARGS \
$BINARYEN_SRC/binaryen-c.cpp \
shared.bc \
$OUT/shared.bc \
-I$BINARYEN_SRC/ \
-s EXPORTED_FUNCTIONS=[${EXPORTED_FUNCTIONS}] \
-o $BINARYEN_BIN/binaryen${OUT_FILE_SUFFIX}.js \
-o $OUT/binaryen${OUT_FILE_SUFFIX}.js \
-s MODULARIZE_INSTANCE=1 \
-s 'EXPORT_NAME="Binaryen"' \
--post-js $BINARYEN_SRC/js/binaryen.js-post.js
9 changes: 4 additions & 5 deletions scripts/test/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ def warn(text):
else:
options.binaryen_bin = 'bin'

# ensure BINARYEN_ROOT is set up
os.environ['BINARYEN_ROOT'] = os.path.dirname(os.path.abspath(
options.binaryen_bin))
options.binaryen_bin = os.path.normpath(os.path.abspath(options.binaryen_bin))

options.binaryen_bin = os.path.normpath(options.binaryen_bin)
# ensure BINARYEN_ROOT is set up
os.environ['BINARYEN_ROOT'] = os.path.dirname(options.binaryen_bin)

wasm_dis_filenames = ['wasm-dis', 'wasm-dis.exe']
if not any(os.path.isfile(os.path.join(options.binaryen_bin, f))
Expand Down Expand Up @@ -173,7 +172,7 @@ def is_exe(fpath):
WASM_METADCE = [os.path.join(options.binaryen_bin, 'wasm-metadce')]
WASM_EMSCRIPTEN_FINALIZE = [os.path.join(options.binaryen_bin,
'wasm-emscripten-finalize')]
BINARYEN_JS = os.path.join(options.binaryen_bin, 'binaryen.js')
BINARYEN_JS = os.path.join(options.binaryen_root, 'out', 'binaryen.js')


def wrap_with_valgrind(cmd):
Expand Down
7 changes: 1 addition & 6 deletions travis-emcc-tests.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
set -e
echo "travis-test pre-test"
python -c "import check ; check.run_binaryen_js_tests()"
echo "travis-test build"
ls -al bin/
./build-js.sh -g
ls -al bin/
echo "travis-test post-test"
echo "travis-test test"
python -c "import check ; check.run_binaryen_js_tests()"
echo "travis-test yay!"