Skip to content

Commit

Permalink
Initial support for pthreads + dynamic linking
Browse files Browse the repository at this point in the history
See #3494
  • Loading branch information
sbc100 committed Nov 10, 2020
1 parent 2b27728 commit fc4ccc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 0 additions & 6 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1651,12 +1651,6 @@ def include_and_export(name):
if not shared.Settings.MINIMAL_RUNTIME:
shared.Settings.EXPORTED_RUNTIME_METHODS += ['ExitStatus']

if shared.Settings.LINKABLE:
exit_with_error('-s LINKABLE=1 is not supported with -s USE_PTHREADS>0!')
if shared.Settings.SIDE_MODULE:
exit_with_error('-s SIDE_MODULE=1 is not supported with -s USE_PTHREADS>0!')
if shared.Settings.MAIN_MODULE:
exit_with_error('-s MAIN_MODULE=1 is not supported with -s USE_PTHREADS>0!')
if shared.Settings.PROXY_TO_WORKER:
exit_with_error('--proxy-to-worker is not supported with -s USE_PTHREADS>0! Use the option -s PROXY_TO_PTHREAD=1 if you want to run the main thread of a multithreaded application in a web worker.')
else:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8139,6 +8139,10 @@ def test_emscripten_futexes(self):
self.set_setting('USE_PTHREADS', '1')
self.do_run_in_out_file_test('tests', 'core', 'pthread', 'emscripten_futexes.c')

@node_pthreads
def test_pthreads_dynamic_linking(self):
self.do_basic_dylink_test()

# Tests the emscripten_get_exported_function() API.
def test_emscripten_get_exported_function(self):
# Could also test with -s ALLOW_TABLE_GROWTH=1
Expand Down

0 comments on commit fc4ccc3

Please sign in to comment.