aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKleis Auke Wolthuizen <github@kleisauke.nl>2020-10-31 13:40:00 +0100
committerNirbheek Chauhan <nirbheek@centricular.com>2023-02-19 02:55:56 +0530
commitcd9f7341c0bf81b802c433a63c48955840d42fb7 (patch)
tree390086780819554457b459666ef04ff3b92a1ffe
parent678cd72793560d9dfa161ef76c65c493c901ac45 (diff)
downloadmeson-cd9f7341c0bf81b802c433a63c48955840d42fb7.zip
meson-cd9f7341c0bf81b802c433a63c48955840d42fb7.tar.gz
meson-cd9f7341c0bf81b802c433a63c48955840d42fb7.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}'])