Skip to content

Commit 2b6e3af

Browse files
authored
Remove asmjs validation (#11551)
This only ever worked in spidermonkey and I don't think we care about asmjs validation anymore anyway. Perhaps this should wait until after we remove fastcomp which is the only route to generating valid asm.js that we still maintain.
1 parent 633885b commit 2b6e3af

File tree

6 files changed

+2
-133
lines changed

6 files changed

+2
-133
lines changed

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridd
296296
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO")
297297

298298
function(em_validate_asmjs_after_build target)
299-
add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo Validating build output for asm.js... COMMAND "python" ARGS "${EMSCRIPTEN_ROOT_PATH}/tools/validate_asmjs.py" "$<TARGET_FILE:${target}>")
299+
message(WARNING "em_validate_asmjs_after_build no longer exists")
300300
endfunction()
301301

302302
# A global counter to guarantee unique names for js library files.

tests/cmake/target_html/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,3 @@ endif()
8888
add_executable(hello_world_gles ${sourceFiles})
8989
target_link_libraries(hello_world_gles cpp_lib)
9090
set_target_properties(hello_world_gles PROPERTIES LINK_FLAGS "${linkFlags}")
91-
92-
# Validating asm.js requires SpiderMonkey JS VM - detect its presence via the SPIDERMONKEY environment variable.
93-
if (DEFINED ENV{SPIDERMONKEY} AND CMAKE_BUILD_TYPE STREQUAL Release)
94-
em_validate_asmjs_after_build(hello_world_gles)
95-
endif()

tests/runner.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -746,16 +746,6 @@ def build(self, src, dirname, filename, main_file=None,
746746
# side memory init file, or an empty one in the js
747747
assert ('/* memory initializer */' not in src) or ('/* memory initializer */ allocate([]' in src)
748748

749-
def validate_asmjs(self, err):
750-
# check for asm.js validation
751-
if 'uccessfully compiled asm.js code' in err and 'asm.js link error' not in err:
752-
print("[was asm.js'ified]", file=sys.stderr)
753-
# check for an asm.js validation error, if we expect one
754-
elif 'asm.js' in err and not self.is_wasm() and self.get_setting('ASM_JS') == 1:
755-
self.fail("did NOT asm.js'ify: " + err)
756-
err = '\n'.join([line for line in err.split('\n') if 'uccessfully compiled asm.js code' not in line])
757-
return err
758-
759749
def get_func(self, src, name):
760750
start = src.index('function ' + name + '(')
761751
t = start
@@ -824,8 +814,6 @@ def run_js(self, filename, engine=None, args=[], output_nicerizer=None, assert_r
824814

825815
out = open(stdout, 'r').read()
826816
err = open(stderr, 'r').read()
827-
if engine == SPIDERMONKEY_ENGINE and self.get_setting('ASM_JS') == 1:
828-
err = self.validate_asmjs(err)
829817
if output_nicerizer:
830818
ret = output_nicerizer(out, err)
831819
else:

tests/test_core.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,11 +2900,6 @@ def test_dlfcn_qsort(self):
29002900
self.do_run(src, 'Sort with main comparison: 5 4 3 2 1 *Sort with lib comparison: 1 2 3 4 5 *',
29012901
output_nicerizer=lambda x, err: x.replace('\n', '*'))
29022902

2903-
if self.get_setting('ASM_JS') and SPIDERMONKEY_ENGINE and os.path.exists(SPIDERMONKEY_ENGINE[0]) and not self.is_wasm():
2904-
out = self.run_js('liblib.so', engine=SPIDERMONKEY_ENGINE)
2905-
if 'asm' in out:
2906-
self.validate_asmjs(out)
2907-
29082903
@needs_dlfcn
29092904
def test_dlfcn_data_and_fptr(self):
29102905
# Failing under v8 since: https://chromium-review.googlesource.com/712595
@@ -3694,10 +3689,6 @@ def dylink_test(self, main, side, expected=None, header=None, main_emcc_args=[],
36943689
self.build(side, self.get_dir(), base, js_outfile=(side_suffix == 'js'))
36953690
if force_c:
36963691
shutil.move(base + '.o.' + side_suffix, 'liblib.cpp.o.' + side_suffix)
3697-
if SPIDERMONKEY_ENGINE and os.path.exists(SPIDERMONKEY_ENGINE[0]) and not self.is_wasm():
3698-
out = self.run_js('liblib.cpp.o.js', engine=SPIDERMONKEY_ENGINE)
3699-
if 'asm' in out:
3700-
self.validate_asmjs(out)
37013692
shutil.move('liblib.cpp.o.' + side_suffix, 'liblib.so')
37023693

37033694
# main settings

tests/test_other.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from tools.shared import try_delete
3434
from tools.shared import EMCC, EMXX, EMAR, EMRANLIB, PYTHON, FILE_PACKAGER, WINDOWS, LLVM_ROOT, EM_BUILD_VERBOSE
3535
from tools.shared import CLANG_CC, CLANG_CXX, LLVM_AR, LLVM_DWARFDUMP
36-
from tools.shared import NODE_JS, SPIDERMONKEY_ENGINE, JS_ENGINES, WASM_ENGINES, V8_ENGINE
36+
from tools.shared import NODE_JS, JS_ENGINES, WASM_ENGINES, V8_ENGINE
3737
from runner import RunnerCore, path_from_root, no_wasm_backend, no_fastcomp, is_slow_test, ensure_dir
3838
from runner import needs_dlfcn, env_modify, no_windows, requires_native_clang, chdir, with_env_modify, create_test_file, parameterized
3939
from runner import js_engines_modify, NON_ZERO
@@ -535,8 +535,6 @@ def test_emcc_asm_v_wasm(self):
535535
print(' engine', engine)
536536
out = self.run_js('a.out.js', engine=engine)
537537
self.assertContained('hello, world!', out)
538-
if not wasm and engine == SPIDERMONKEY_ENGINE:
539-
self.validate_asmjs(out)
540538
if not wasm and not self.is_wasm_backend():
541539
src = open('a.out.js').read()
542540
if opts == []:

tools/validate_asmjs.py

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)