aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKleis Auke Wolthuizen <github@kleisauke.nl>2020-10-31 13:40:00 +0100
committerEli Schwartz <eschwartz93@gmail.com>2022-12-27 06:59:55 -0500
commit898e85d84754536e5f59db770d49b6c057939940 (patch)
treefb1620e53fe4d3300284de2d984d7c82d18f9b13
parent891b4ffe3372c840322f5586430dcba34acf6d53 (diff)
downloadmeson-898e85d84754536e5f59db770d49b6c057939940.zip
meson-898e85d84754536e5f59db770d49b6c057939940.tar.gz
meson-898e85d84754536e5f59db770d49b6c057939940.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.py4
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}'])