diff options
author | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2020-10-31 13:40:00 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-02-06 23:37:24 +0530 |
commit | beba8c6c1cc02f6e130d3ca7c228df807bc4570b (patch) | |
tree | 390086780819554457b459666ef04ff3b92a1ffe | |
parent | 81cd685fbbdc782d3444654eb2b98ee931bde79d (diff) | |
download | meson-beba8c6c1cc02f6e130d3ca7c228df807bc4570b.zip meson-beba8c6c1cc02f6e130d3ca7c228df807bc4570b.tar.gz meson-beba8c6c1cc02f6e130d3ca7c228df807bc4570b.tar.bz2 |
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
-rw-r--r-- | mesonbuild/compilers/mixins/emscripten.py | 4 |
1 files 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}']) |