Skip to content

Commit

Permalink
emscripten: use single arguments when specifying options
Browse files Browse the repository at this point in the history
i.e. without a space between the "-s" and option name. See:
emscripten-core/emscripten#11463

This is supported since Emscripten 1.39.19, see:
emscripten-core/emscripten@f45bea2
  • Loading branch information
kleisauke authored and eli-schwartz committed Dec 27, 2022
1 parent 898e85d commit 51ac9ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cross/wasm.txt
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/compilers/mixins/emscripten.py
Expand Up @@ -65,7 +65,7 @@ def thread_link_flags(self, env: 'Environment') -> T.List[str]:
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':
Expand Down
4 changes: 2 additions & 2 deletions mesonbuild/linkers/linkers.py
Expand Up @@ -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]:
Expand Down

0 comments on commit 51ac9ed

Please sign in to comment.