Skip to content

Commit 7528abe

Browse files
committed
Run more of out tests with -sNO_DEFAULT_TO_CXX
We were previously only applying this flag to tests that use `self.build` (i.e. most test). Now we apply it to and even larger set.
1 parent 01ec561 commit 7528abe

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

test/common.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@ def setUp(self):
833833
self.js_engines = config.JS_ENGINES.copy()
834834
self.settings_mods = {}
835835
self.emcc_args = ['-Wclosure', '-Werror', '-Wno-limited-postlink-optimizations']
836+
# TODO(https://github.com/emscripten-core/emscripten/issues/11121)
837+
# For historical reasons emcc compiles and links as C++ by default.
838+
# However we want to run our tests in a more strict manner. We can
839+
# remove this if the issue above is ever fixed.
840+
self.emcc_args.append('-sNO_DEFAULT_TO_CXX')
836841
self.ldflags = []
837842
# Increate stack trace limit to maximise usefulness of test failure reports
838843
self.node_args = ['--stack-trace-limit=50']
@@ -1034,12 +1039,6 @@ def build(self, filename, libraries=None, includes=None, force_c=False, js_outfi
10341039
filename = test_file(filename)
10351040
suffix = '.js' if js_outfile else '.wasm'
10361041
compiler = [compiler_for(filename, force_c)]
1037-
if compiler[0] == EMCC:
1038-
# TODO(https://github.com/emscripten-core/emscripten/issues/11121)
1039-
# For historical reasons emcc compiles and links as C++ by default.
1040-
# However we want to run our tests in a more strict manner. We can
1041-
# remove this if the issue above is ever fixed.
1042-
compiler.append('-sNO_DEFAULT_TO_CXX')
10431042

10441043
if force_c:
10451044
assert shared.suffix(filename) != '.c', 'force_c is not needed for source files ending in .c'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8422
1+
8391
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
23089
1+
23004
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7251
1+
7218
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19713
1+
19628

0 commit comments

Comments
 (0)