Skip to content

Commit

Permalink
emscripten: fix false positives in linking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi authored and jpakkane committed Oct 17, 2019
1 parent 50646a8 commit 0841d17
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mesonbuild/compilers/mixins/emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,16 @@ def get_allow_undefined_link_args(self) -> typing.List[str]:

def get_linker_output_args(self, output: str) -> typing.List[str]:
return ['-o', output]

def _get_compile_output(self, dirname, mode):
# In pre-processor mode, the output is sent to stdout and discarded
if mode == 'preprocess':
return None
# Unlike sane toolchains, emcc infers the kind of output from its name.
# This is the only reason why this method is overriden; compiler tests
# do not work well with the default exe/obj suffices.
if mode == 'link':
suffix = 'js'
else:
suffix = 'wasm'
return os.path.join(dirname, 'output.' + suffix)

0 comments on commit 0841d17

Please sign in to comment.