From beba8c6c1cc02f6e130d3ca7c228df807bc4570b Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 31 Oct 2020 13:40:00 +0100 Subject: emscripten: prefer `-pthread` over `-s USE_PTHREADS=1` See: https://github.com/emscripten-core/emscripten/issues/12346 This is supported since Emscripten 1.38.33, see: https://github.com/emscripten-core/emscripten/commit/24350798a8570f567327f873cf1efb0361aec284 --- mesonbuild/compilers/mixins/emscripten.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py index 0796d6f..3bf192f 100644 --- a/mesonbuild/compilers/mixins/emscripten.py +++ b/mesonbuild/compilers/mixins/emscripten.py @@ -59,10 +59,10 @@ class EmscriptenMixin(Compiler): 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}']) -- cgit v1.1