Skip to content

Commit

Permalink
emscripten: prefer -pthread over -s USE_PTHREADS=1
Browse files Browse the repository at this point in the history
See: emscripten-core/emscripten#12346

This is supported since Emscripten 1.38.33, see:
emscripten-core/emscripten@2435079
  • Loading branch information
kleisauke authored and eli-schwartz committed Dec 27, 2022
1 parent 891b4ff commit 898e85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesonbuild/compilers/mixins/emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def _get_compile_output(self, dirname: str, mode: str) -> str:
return os.path.join(dirname, 'output.' + suffix)

def thread_flags(self, env: 'Environment') -> T.List[str]:
return ['-s', 'USE_PTHREADS=1']
return ['-pthread']

def thread_link_flags(self, env: 'Environment') -> T.List[str]:
args = ['-s', 'USE_PTHREADS=1']
args = ['-pthread']
count: int = env.coredata.options[OptionKey('thread_count', lang=self.language, machine=self.for_machine)].value
if count:
args.extend(['-s', f'PTHREAD_POOL_SIZE={count}'])
Expand Down

0 comments on commit 898e85d

Please sign in to comment.