Skip to content

Commit 4cdbf34

Browse files
committed
fix argument passing to emcc on src-to-bitcode in test runner
1 parent 46d3849 commit 4cdbf34

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/runner.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ def build(self, src, dirname, filename, output_processor=None, main_file=None, a
230230
os.remove(f + '.o')
231231
except:
232232
pass
233-
args = [PYTHON, EMCC] + Building.COMPILER_TEST_OPTS + \
233+
args = [PYTHON, EMCC] + Building.COMPILER_TEST_OPTS + Settings.serialize() + \
234234
['-I', dirname, '-I', os.path.join(dirname, 'include')] + \
235235
map(lambda include: '-I' + include, includes) + \
236236
['-c', f, '-o', f + '.o']
237-
output = Popen(args, stdout=PIPE, stderr=self.stderr_redirect).communicate()[0]
237+
output = Popen(args, stdout=PIPE, stderr=self.stderr_redirect if not DEBUG else None).communicate()[0]
238238
assert os.path.exists(f + '.o'), 'Source compilation error: ' + output
239239

240240
# Link all files
@@ -10044,9 +10044,10 @@ def setUp(self):
1004410044
Building.LLVM_OPTS = 0
1004510045
if '-O2' in self.emcc_args:
1004610046
Building.COMPILER_TEST_OPTS = [] # remove -g in -O2 tests, for more coverage
10047-
for arg in self.emcc_args:
10048-
if arg.startswith('-O'):
10049-
Building.COMPILER_TEST_OPTS.append(arg) # so bitcode is optimized too, this is for cpp to ll
10047+
Building.COMPILER_TEST_OPTS += self.emcc_args
10048+
#for arg in self.emcc_args:
10049+
# if arg.startswith('-O'):
10050+
# Building.COMPILER_TEST_OPTS.append(arg) # so bitcode is optimized too, this is for cpp to ll
1005010051
return
1005110052

1005210053
embetter = %d

0 commit comments

Comments
 (0)