diff --git a/tests/test_core.py b/tests/test_core.py index e24565fef3dfc..feeebf63abba4 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1858,7 +1858,6 @@ def test_inlinejs3(self): if self.is_wasm(): self.skipTest('wasm requires a proper asm module') - self.emcc_args.append('-Wno-almost-asm') src = path_from_root('tests', 'core', 'test_inlinejs3.c') output = shared.unsuffixed(src) + '.out' @@ -1971,7 +1970,7 @@ def test_minimal_runtime_memorygrowth(self): expect_fail = True self.do_run(src, 'OOM', assert_returncode=NON_ZERO if expect_fail else 0) # Win with it - self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH'] + self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH'] self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*') def test_memorygrowth(self): @@ -1989,7 +1988,7 @@ def test_memorygrowth(self): fail = open('src.js').read() # Win with it - self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH'] + self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH'] self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*') win = open('src.js').read() @@ -2025,7 +2024,7 @@ def test_memorygrowth_2(self): fail = open('src.js').read() # Win with it - self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH'] + self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH'] self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*') win = open('src.js').read() @@ -2075,7 +2074,7 @@ def test_memorygrowth_3_force_fail_reallocBuffer(self): if self.has_changed_setting('ALLOW_MEMORY_GROWTH'): self.skipTest('test needs to modify memory growth') - self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'TEST_MEMORY_GROWTH_FAILS=1'] + self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'TEST_MEMORY_GROWTH_FAILS=1'] self.do_run_in_out_file_test('tests', 'core', 'test_memorygrowth_3.c') @parameterized({ @@ -2086,7 +2085,7 @@ def test_memorygrowth_3_force_fail_reallocBuffer(self): def test_aborting_new(self, args): # test that C++ new properly errors if we fail to malloc when growth is # enabled, with or without growth - self.emcc_args += ['-Wno-almost-asm', '-s', 'MAXIMUM_MEMORY=18MB'] + args + self.emcc_args += ['-s', 'MAXIMUM_MEMORY=18MB'] + args self.do_run_in_out_file_test('tests', 'core', 'test_aborting_new.cpp') @no_wasm2js('no WebAssembly.Memory()') @@ -4837,7 +4836,7 @@ def test_files(self): self.emcc_args = [x for x in self.emcc_args if x != '-g'] # ensure we test --closure 1 --memory-init-file 1 (-g would disable closure) elif '-O3' in self.emcc_args and not self.is_wasm(): print('closure 2') - self.emcc_args += ['--closure', '2', '-Wno-almost-asm'] # Use closure 2 here for some additional coverage + self.emcc_args += ['--closure', '2'] # Use closure 2 here for some additional coverage return self.skipTest('TODO: currently skipped because CI runs out of memory running Closure in this test!') self.emcc_args += ['-s', 'FORCE_FILESYSTEM=1', '--pre-js', 'pre.js'] @@ -6974,7 +6973,7 @@ def test_webidl(self, mode, allow_memory_growth): # being used as Box2D.* or Ammo.*, and we cannot rely on "Module" being always present (closure may remove it). self.emcc_args += ['-s', 'EXPORTED_FUNCTIONS=["_malloc","_free"]', '--post-js', 'glue.js'] if allow_memory_growth: - self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH', '-Wno-almost-asm'] + self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH'] def post(filename): with open(filename, 'a') as f: diff --git a/tests/test_other.py b/tests/test_other.py index ce7841d34eea2..c5f1ae697c1d8 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -5906,22 +5906,6 @@ def test_no_warn_exported_jslibfunc(self): '-s', 'EXPORTED_FUNCTIONS=["_main", "_alGetError"]'], stderr=PIPE).stderr self.assertNotContained('function requested to be exported, but not implemented: "_alGetError"', err) - @no_wasm_backend() - def test_almost_asm_warning(self): - def run(args, expected): - print(args, expected) - err = self.run_process([EMCC, path_from_root('tests', 'hello_world.c'), '-s', 'WASM=0'] + args, stderr=PIPE).stderr - if expected: - self.assertContained('[-Walmost-asm]', err) - else: - self.assertEqual(err, '') - - run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1'], True), # default - # suppress almost-asm warning manually - run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1', '-Wno-almost-asm'], False), - # last warning flag should "win" - run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1', '-Wno-almost-asm', '-Walmost-asm'], True) - def test_musl_syscalls(self): self.run_process([EMCC, path_from_root('tests', 'hello_world.c')]) src = open('a.out.js').read() diff --git a/tools/shared.py b/tools/shared.py index 8becf815db983..c0124d817652c 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -52,6 +52,7 @@ # warning about absolute-paths is disabled by default, and not enabled by -Wall diagnostics.add_warning('absolute-paths', enabled=False, part_of_all=False) +# unused diagnositic flags. TODO(sbc): remove at some point diagnostics.add_warning('almost-asm') diagnostics.add_warning('invalid-input') # Don't show legacy settings warnings by default