emscripten: use single arguments when specifying options

i.e. without a space between the "-s" and option name. See:
https://github.com/emscripten-core/emscripten/issues/11463

This is supported since Emscripten 1.39.19, see:
f45bea21f3
pull/11219/head
Kleis Auke Wolthuizen 2 years ago committed by Eli Schwartz
parent 898e85d847
commit 51ac9ed317
  1. 4
      cross/wasm.txt
  2. 2
      mesonbuild/compilers/mixins/emscripten.py
  3. 4
      mesonbuild/linkers/linkers.py

@ -5,9 +5,9 @@ ar = '/home/jpakkane/src/emsdk/upstream/emscripten/emar'
[built-in options]
c_args = []
c_link_args = ['-s','EXPORT_ALL=1']
c_link_args = ['-sEXPORT_ALL=1']
cpp_args = []
cpp_link_args = ['-s', 'EXPORT_ALL=1']
cpp_link_args = ['-sEXPORT_ALL=1']
[host_machine]

@ -65,7 +65,7 @@ class EmscriptenMixin(Compiler):
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}'])
args.append(f'-sPTHREAD_POOL_SIZE={count}')
return args
def get_options(self) -> 'coredata.MutableKeyedOptionDictType':

@ -889,10 +889,10 @@ class WASMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna
id = 'ld.wasm'
def get_allow_undefined_args(self) -> T.List[str]:
return ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=0']
return ['-sERROR_ON_UNDEFINED_SYMBOLS=0']
def no_undefined_args(self) -> T.List[str]:
return ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=1']
return ['-sERROR_ON_UNDEFINED_SYMBOLS=1']
def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str,
suffix: str, soversion: str, darwin_versions: T.Tuple[str, str]) -> T.List[str]:

Loading…
Cancel
Save