Skip to content

Commit 2414b0d

Browse files
authored
Remove use of -Wno-almost-asm (#12321)
1 parent 7069998 commit 2414b0d

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

tests/test_core.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,6 @@ def test_inlinejs3(self):
18581858
if self.is_wasm():
18591859
self.skipTest('wasm requires a proper asm module')
18601860

1861-
self.emcc_args.append('-Wno-almost-asm')
18621861
src = path_from_root('tests', 'core', 'test_inlinejs3.c')
18631862
output = shared.unsuffixed(src) + '.out'
18641863

@@ -1971,7 +1970,7 @@ def test_minimal_runtime_memorygrowth(self):
19711970
expect_fail = True
19721971
self.do_run(src, 'OOM', assert_returncode=NON_ZERO if expect_fail else 0)
19731972
# Win with it
1974-
self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH']
1973+
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH']
19751974
self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*')
19761975

19771976
def test_memorygrowth(self):
@@ -1989,7 +1988,7 @@ def test_memorygrowth(self):
19891988
fail = open('src.js').read()
19901989

19911990
# Win with it
1992-
self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH']
1991+
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH']
19931992
self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*')
19941993
win = open('src.js').read()
19951994

@@ -2025,7 +2024,7 @@ def test_memorygrowth_2(self):
20252024
fail = open('src.js').read()
20262025

20272026
# Win with it
2028-
self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH']
2027+
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH']
20292028
self.do_run(src, '*pre: hello,4.955*\n*hello,4.955*\n*hello,4.955*')
20302029
win = open('src.js').read()
20312030

@@ -2075,7 +2074,7 @@ def test_memorygrowth_3_force_fail_reallocBuffer(self):
20752074
if self.has_changed_setting('ALLOW_MEMORY_GROWTH'):
20762075
self.skipTest('test needs to modify memory growth')
20772076

2078-
self.emcc_args += ['-Wno-almost-asm', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'TEST_MEMORY_GROWTH_FAILS=1']
2077+
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'TEST_MEMORY_GROWTH_FAILS=1']
20792078
self.do_run_in_out_file_test('tests', 'core', 'test_memorygrowth_3.c')
20802079

20812080
@parameterized({
@@ -2086,7 +2085,7 @@ def test_memorygrowth_3_force_fail_reallocBuffer(self):
20862085
def test_aborting_new(self, args):
20872086
# test that C++ new properly errors if we fail to malloc when growth is
20882087
# enabled, with or without growth
2089-
self.emcc_args += ['-Wno-almost-asm', '-s', 'MAXIMUM_MEMORY=18MB'] + args
2088+
self.emcc_args += ['-s', 'MAXIMUM_MEMORY=18MB'] + args
20902089
self.do_run_in_out_file_test('tests', 'core', 'test_aborting_new.cpp')
20912090

20922091
@no_wasm2js('no WebAssembly.Memory()')
@@ -4837,7 +4836,7 @@ def test_files(self):
48374836
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)
48384837
elif '-O3' in self.emcc_args and not self.is_wasm():
48394838
print('closure 2')
4840-
self.emcc_args += ['--closure', '2', '-Wno-almost-asm'] # Use closure 2 here for some additional coverage
4839+
self.emcc_args += ['--closure', '2'] # Use closure 2 here for some additional coverage
48414840
return self.skipTest('TODO: currently skipped because CI runs out of memory running Closure in this test!')
48424841

48434842
self.emcc_args += ['-s', 'FORCE_FILESYSTEM=1', '--pre-js', 'pre.js']
@@ -6974,7 +6973,7 @@ def test_webidl(self, mode, allow_memory_growth):
69746973
# being used as Box2D.* or Ammo.*, and we cannot rely on "Module" being always present (closure may remove it).
69756974
self.emcc_args += ['-s', 'EXPORTED_FUNCTIONS=["_malloc","_free"]', '--post-js', 'glue.js']
69766975
if allow_memory_growth:
6977-
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH', '-Wno-almost-asm']
6976+
self.emcc_args += ['-s', 'ALLOW_MEMORY_GROWTH']
69786977

69796978
def post(filename):
69806979
with open(filename, 'a') as f:

tests/test_other.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5906,22 +5906,6 @@ def test_no_warn_exported_jslibfunc(self):
59065906
'-s', 'EXPORTED_FUNCTIONS=["_main", "_alGetError"]'], stderr=PIPE).stderr
59075907
self.assertNotContained('function requested to be exported, but not implemented: "_alGetError"', err)
59085908

5909-
@no_wasm_backend()
5910-
def test_almost_asm_warning(self):
5911-
def run(args, expected):
5912-
print(args, expected)
5913-
err = self.run_process([EMCC, path_from_root('tests', 'hello_world.c'), '-s', 'WASM=0'] + args, stderr=PIPE).stderr
5914-
if expected:
5915-
self.assertContained('[-Walmost-asm]', err)
5916-
else:
5917-
self.assertEqual(err, '')
5918-
5919-
run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1'], True), # default
5920-
# suppress almost-asm warning manually
5921-
run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1', '-Wno-almost-asm'], False),
5922-
# last warning flag should "win"
5923-
run(['-O1', '-s', 'ALLOW_MEMORY_GROWTH=1', '-Wno-almost-asm', '-Walmost-asm'], True)
5924-
59255909
def test_musl_syscalls(self):
59265910
self.run_process([EMCC, path_from_root('tests', 'hello_world.c')])
59275911
src = open('a.out.js').read()

tools/shared.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
# warning about absolute-paths is disabled by default, and not enabled by -Wall
5454
diagnostics.add_warning('absolute-paths', enabled=False, part_of_all=False)
55+
# unused diagnositic flags. TODO(sbc): remove at some point
5556
diagnostics.add_warning('almost-asm')
5657
diagnostics.add_warning('invalid-input')
5758
# Don't show legacy settings warnings by default

0 commit comments

Comments
 (0)