Created
June 5, 2021 03:10
-
-
Save satori99/167928e4029a47fb2eea29a3fd6735cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
From: Kleis Auke Wolthuizen <[email protected]> | |
Date: Sat, 31 Oct 2020 13:40:00 +0100 | |
Subject: [PATCH 1/1] Prefer -pthread over -s USE_PTHREADS=1 | |
See https://github.com/emscripten-core/emscripten/issues/12346 | |
Upstream-Status: Pending | |
diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py | |
index 1111111..2222222 100644 | |
--- a/mesonbuild/compilers/mixins/emscripten.py | |
+++ b/mesonbuild/compilers/mixins/emscripten.py | |
@@ -47,10 +47,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}']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment