Browse Source

linkers/compilers: Move an emscripten method to the compiler

This needed an attribute the linker doesn't have.
tags/0.56.0.rc1
Dylan Baker 1 month ago
parent
commit
4401668c9a
2 changed files with 7 additions and 7 deletions
  1. +7
    -0
      mesonbuild/compilers/mixins/emscripten.py
  2. +0
    -7
      mesonbuild/linkers.py

+ 7
- 0
mesonbuild/compilers/mixins/emscripten.py View File

@@ -41,6 +41,13 @@ class EmscriptenMixin:
def thread_flags(self, env: 'Environment') -> T.List[str]:
return ['-s', 'USE_PTHREADS=1']

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
if count:
args.extend(['-s', 'PTHREAD_POOL_SIZE={}'.format(count)])
return args

def get_options(self):
opts = super().get_options()
opts.update({


+ 0
- 7
mesonbuild/linkers.py View File

@@ -780,13 +780,6 @@ class WASMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna

id = 'ld.wasm'

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
if count:
args.extend(['-s', 'PTHREAD_POOL_SIZE={}'.format(count)])
return args

def get_allow_undefined_args(self) -> T.List[str]:
return ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=0']



Loading…
Cancel
Save