aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-11-09 19:08:48 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2021-01-06 14:52:26 +0530
commitb41e9aab83870ed6c54c66c1392155ac8765ddc7 (patch)
treebf05a0569fa9a8d31c1d658b362c682b7aa48bc7
parent584daea0f3c43ff3a8be320fc533c698d714057b (diff)
downloadmeson-b41e9aab83870ed6c54c66c1392155ac8765ddc7.zip
meson-b41e9aab83870ed6c54c66c1392155ac8765ddc7.tar.gz
meson-b41e9aab83870ed6c54c66c1392155ac8765ddc7.tar.bz2
Fix WASM thread count option. Closes #7921.
-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 87bc40c..cd18b35 100644
--- a/mesonbuild/compilers/mixins/emscripten.py
+++ b/mesonbuild/compilers/mixins/emscripten.py
@@ -50,7 +50,7 @@ class EmscriptenMixin(Compiler):
def thread_link_flags(self, env: 'Environment') -> T.List[str]:
args = ['-s', 'USE_PTHREADS=1']
- count = env.coredata.compiler_options[self.for_machine]['{}_thread_count'.format(self.language)].value # type: int
+ count = env.coredata.compiler_options[self.for_machine][self.language]['thread_count'].value # type: int
if count:
args.extend(['-s', 'PTHREAD_POOL_SIZE={}'.format(count)])
return args
@@ -58,7 +58,7 @@ class EmscriptenMixin(Compiler):
def get_options(self) -> 'coredata.OptionDictType':
opts = super().get_options()
opts.update({
- '{}_thread_count'.format(self.language): coredata.UserIntegerOption(
+ 'thread_count': coredata.UserIntegerOption(
'Number of threads to use in web assembly, set to 0 to disable',
(0, None, 4), # Default was picked at random
),