Skip to content

Commit

Permalink
Delete wasm-merge (#1969)
Browse files Browse the repository at this point in the history
It is not very useful.
  • Loading branch information
tlively authored Mar 29, 2019
1 parent c5a22ba commit f44c56c
Show file tree
Hide file tree
Showing 96 changed files with 5 additions and 2,801 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ SET_PROPERTY(TARGET wasm-opt PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-opt PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-opt DESTINATION ${CMAKE_INSTALL_BINDIR})

SET(wasm-merge_SOURCES
src/tools/wasm-merge.cpp
)
ADD_EXECUTABLE(wasm-merge
${wasm-merge_SOURCES})
TARGET_LINK_LIBRARIES(wasm-merge wasm asmjs emscripten-optimizer passes ir cfg support wasm)
SET_PROPERTY(TARGET wasm-merge PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-merge PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-merge DESTINATION bin)

SET(wasm-metadce_SOURCES
src/tools/wasm-metadce.cpp
)
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ This repository contains code that builds the following tools in `bin/`:
optimizer infrastructure. This is used by Emscripten in Binaryen mode when it
uses Emscripten's fastcomp asm.js backend.
* **wasm2js**: A WebAssembly-to-JS compiler (still experimental).
* **wasm-merge**: Combines wasm files into a single big wasm file (without
sophisticated linking).
* **wasm-ctor-eval**: A tool that can execute C++ global constructors ahead of
time. Used by Emscripten.
* **wasm-emscripten-finalize**: Takes a wasm binary produced by llvm+lld and
Expand Down
33 changes: 2 additions & 31 deletions auto_update_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
from scripts.test.support import run_command, split_wast, node_test_glue, node_has_webassembly
from scripts.test.shared import (
ASM2WASM, MOZJS, NODEJS, WASM_OPT, WASM_AS, WASM_DIS,
WASM_CTOR_EVAL, WASM_MERGE, WASM_REDUCE, WASM_METADCE,
BINARYEN_INSTALL_DIR, BINARYEN_JS,
has_shell_timeout, options)
WASM_CTOR_EVAL, WASM_REDUCE, WASM_METADCE, BINARYEN_INSTALL_DIR,
BINARYEN_JS, has_shell_timeout, options)

from scripts.test import lld
from scripts.test import wasm2js
Expand Down Expand Up @@ -245,33 +244,6 @@ def update_wasm_dis_tests():
open(t + '.fromBinary', 'w').write(actual)


def update_wasm_merge_tests():
print '\n[ checking wasm-merge... ]\n'
for t in os.listdir(os.path.join('test', 'merge')):
if t.endswith(('.wast', '.wasm')):
print '..', t
t = os.path.join('test', 'merge', t)
u = t + '.toMerge'
for finalize in [0, 1]:
for opt in [0, 1]:
cmd = WASM_MERGE + [t, u, '-o', 'a.wast', '-S', '--verbose']
if finalize:
cmd += ['--finalize-memory-base=1024', '--finalize-table-base=8']
if opt:
cmd += ['-O']
stdout = run_command(cmd)
actual = open('a.wast').read()
out = t + '.combined'
if finalize:
out += '.finalized'
if opt:
out += '.opt'
with open(out, 'w') as o:
o.write(actual)
with open(out + '.stdout', 'w') as o:
o.write(stdout)


def update_binaryen_js_tests():
if not (MOZJS or NODEJS):
print 'no vm to run binaryen.js tests'
Expand Down Expand Up @@ -362,7 +334,6 @@ def main():
update_bin_fmt_tests()
update_example_tests()
update_wasm_dis_tests()
update_wasm_merge_tests()
update_ctor_eval_tests()
wasm2js.update_wasm2js_tests()
update_metadce_tests()
Expand Down
34 changes: 3 additions & 31 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

from scripts.test.support import run_command, split_wast, node_test_glue, node_has_webassembly
from scripts.test.shared import (
BIN_DIR, MOZJS, NATIVECC, NATIVEXX, NODEJS, BINARYEN_JS,
WASM_AS, WASM_CTOR_EVAL, WASM_OPT, WASM_SHELL, WASM_MERGE, WASM_METADCE,
WASM_DIS, WASM_REDUCE, binary_format_check, delete_from_orbit, fail, fail_with_error,
BIN_DIR, MOZJS, NATIVECC, NATIVEXX, NODEJS, BINARYEN_JS, WASM_AS,
WASM_CTOR_EVAL, WASM_OPT, WASM_SHELL, WASM_METADCE, WASM_DIS, WASM_REDUCE,
binary_format_check, delete_from_orbit, fail, fail_with_error,
fail_if_not_identical, fail_if_not_contained, has_vanilla_emcc,
has_vanilla_llvm, minify_check, options, tests, requested, warnings,
has_shell_timeout, fail_if_not_identical_to_file
Expand Down Expand Up @@ -203,33 +203,6 @@ def check():
with_pass_debug(check)


def run_wasm_merge_tests():
print '\n[ checking wasm-merge... ]\n'

test_dir = os.path.join(options.binaryen_test, 'merge')
for t in os.listdir(test_dir):
if t.endswith(('.wast', '.wasm')):
print '..', t
t = os.path.join(test_dir, t)
u = t + '.toMerge'
for finalize in [0, 1]:
for opt in [0, 1]:
cmd = WASM_MERGE + [t, u, '-o', 'a.wast', '-S', '--verbose']
if finalize:
cmd += ['--finalize-memory-base=1024', '--finalize-table-base=8']
if opt:
cmd += ['-O']
stdout = run_command(cmd)
actual = open('a.wast').read()
out = t + '.combined'
if finalize:
out += '.finalized'
if opt:
out += '.opt'
fail_if_not_identical_to_file(actual, out)
fail_if_not_identical_to_file(stdout, out + '.stdout')


def run_crash_tests():
print "\n[ checking we don't crash on tricky inputs... ]\n"

Expand Down Expand Up @@ -614,7 +587,6 @@ def main():
asm2wasm.test_asm2wasm()
asm2wasm.test_asm2wasm_binary()
run_wasm_dis_tests()
run_wasm_merge_tests()
run_crash_tests()
run_dylink_tests()
run_ctor_eval_tests()
Expand Down
1 change: 0 additions & 1 deletion scripts/test/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def is_exe(fpath):
WASM2JS = [os.path.join(options.binaryen_bin, 'wasm2js')]
WASM_CTOR_EVAL = [os.path.join(options.binaryen_bin, 'wasm-ctor-eval')]
WASM_SHELL = [os.path.join(options.binaryen_bin, 'wasm-shell')]
WASM_MERGE = [os.path.join(options.binaryen_bin, 'wasm-merge')]
WASM_REDUCE = [os.path.join(options.binaryen_bin, 'wasm-reduce')]
WASM_METADCE = [os.path.join(options.binaryen_bin, 'wasm-metadce')]
WASM_EMSCRIPTEN_FINALIZE = [os.path.join(options.binaryen_bin,
Expand Down
Loading

0 comments on commit f44c56c

Please sign in to comment.