Skip to content

Commit bc22316

Browse files
committed
feedback
1 parent 646d042 commit bc22316

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

tests/test_core.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7826,16 +7826,6 @@ def test_asyncify_unused(self):
78267826
self.set_setting('ASYNCIFY', 1)
78277827
self.do_run_in_out_file_test('tests', 'core', 'test_hello_world')
78287828

7829-
<<<<<<< HEAD
7830-
@no_wasm_backend('EMTERPRETIFY causes JSOptimizer to run, which is '
7831-
'unsupported with Wasm backend')
7832-
def test_coroutine_emterpretify_async(self):
7833-
self.emcc_args.append('-Wno-emterpreter')
7834-
# The same EMTERPRETIFY_WHITELIST should be in other.test_emterpreter_advise
7835-
self.do_test_coroutine({'EMTERPRETIFY': 1, 'EMTERPRETIFY_ASYNC': 1, 'EMTERPRETIFY_WHITELIST': ['_fib', '_f', '_g'], 'ASSERTIONS': 1})
7836-
7837-
=======
7838-
>>>>>>> 02339ca62... Remove emterpreter support.
78397829
@parameterized({
78407830
'normal': ([], True),
78417831
'blacklist_a': (['-s', 'ASYNCIFY_BLACKLIST=["foo(int, double)"]'], False),
@@ -7864,21 +7854,6 @@ def test_asyncify_lists(self, args, should_pass, response=None):
78647854
if should_pass:
78657855
raise
78667856

7867-
<<<<<<< HEAD
7868-
# Test basic emterpreter functionality in all core compilation modes.
7869-
@no_emterpreter
7870-
@no_wasm_backend('EMTERPRETIFY causes JSOptimizer to run, which is '
7871-
'unsupported with Wasm backend')
7872-
def test_emterpretify(self):
7873-
self.emcc_args.append('-Wno-emterpreter')
7874-
self.set_setting('EMTERPRETIFY', 1)
7875-
self.do_run_in_out_file_test('tests', 'core', 'test_hello_world')
7876-
print('async')
7877-
self.set_setting('EMTERPRETIFY_ASYNC', 1)
7878-
self.do_run_in_out_file_test('tests', 'core', 'test_hello_world')
7879-
7880-
=======
7881-
>>>>>>> 02339ca62... Remove emterpreter support.
78827857
@no_fastcomp('wasm-backend specific feature')
78837858
def test_emscripten_scan_registers(self):
78847859
self.set_setting('ASYNCIFY', 1)
@@ -8733,13 +8708,6 @@ def setUp(self):
87338708
wasm2ss = make_run('wasm2ss', emcc_args=['-O2'], settings={'STACK_OVERFLOW_CHECK': 2})
87348709
strict = make_run('strict', emcc_args=['-O2'], settings={'DEFAULT_TO_CXX': 0})
87358710

8736-
<<<<<<< HEAD
8737-
if not shared.Settings.WASM_BACKEND:
8738-
# emterpreter
8739-
asm2i = make_run('asm2i', emcc_args=['-O2', '-Wno-emterpreter'], settings={'EMTERPRETIFY': 1, 'WASM': 0})
8740-
8741-
=======
8742-
>>>>>>> 02339ca62... Remove emterpreter support.
87438711
if shared.Settings.WASM_BACKEND:
87448712
lsan = make_run('lsan', emcc_args=['-fsanitize=leak'], settings={'ALLOW_MEMORY_GROWTH': 1})
87458713
asan = make_run('asan', emcc_args=['-fsanitize=address'], settings={'ALLOW_MEMORY_GROWTH': 1, 'ASAN_SHADOW_SIZE': 128 * 1024 * 1024})

tests/test_other.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5444,6 +5444,42 @@ def test_stat_fail_alongtheway(self):
54445444
pass: error == ENOTDIR
54455445
''', run_js('a.out.js'))
54465446

5447+
def test_link_with_a_static(self):
5448+
create_test_file('x.c', r'''
5449+
int init_weakref(int a, int b) {
5450+
return a + b;
5451+
}
5452+
''')
5453+
create_test_file('y.c', r'''
5454+
static int init_weakref(void) { // inlined in -O2, not in -O0 where it shows up in llvm-nm as 't'
5455+
return 150;
5456+
}
5457+
5458+
int testy(void) {
5459+
return init_weakref();
5460+
}
5461+
''')
5462+
create_test_file('z.c', r'''
5463+
extern int init_weakref(int, int);
5464+
extern int testy(void);
5465+
5466+
int main(void) {
5467+
return testy() + init_weakref(5, 6);
5468+
}
5469+
''')
5470+
run_process([PYTHON, EMCC, 'x.c', '-o', 'x.o'])
5471+
run_process([PYTHON, EMCC, 'y.c', '-o', 'y.o'])
5472+
run_process([PYTHON, EMCC, 'z.c', '-o', 'z.o'])
5473+
try_delete('libtest.a')
5474+
run_process([PYTHON, EMAR, 'rc', 'libtest.a', 'y.o'])
5475+
run_process([PYTHON, EMAR, 'rc', 'libtest.a', 'x.o'])
5476+
run_process([PYTHON, EMRANLIB, 'libtest.a'])
5477+
5478+
for args in [[], ['-O2']]:
5479+
print('args:', args)
5480+
run_process([PYTHON, EMCC, 'z.o', 'libtest.a', '-s', 'EXIT_RUNTIME=1'] + args)
5481+
run_js('a.out.js', assert_returncode=161)
5482+
54475483
def test_link_with_bad_o_in_a(self):
54485484
# when building a .a, we force-include all the objects inside it. but, some
54495485
# may not be valid bitcode, e.g. if it contains metadata or something else

0 commit comments

Comments
 (0)