diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-08 14:04:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 14:04:48 +0200 |
commit | 7234316dc7784667443d358b0d2c3e2ff561b474 (patch) | |
tree | fbf0413aaa221acd2a8437b75cf5dd349471563c /mesonbuild/environment.py | |
parent | a16db4e9185fcf060ea3e336cbffbe16018be934 (diff) | |
parent | 654f427759d5aa3be55d8929b18c17a2b8fcac69 (diff) | |
download | meson-7234316dc7784667443d358b0d2c3e2ff561b474.zip meson-7234316dc7784667443d358b0d2c3e2ff561b474.tar.gz meson-7234316dc7784667443d358b0d2c3e2ff561b474.tar.bz2 |
Merge pull request #6688 from dcbaker/emcc-linker-bugs
Emcc linker bugs and improvments
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 5e60294..7fda3be 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -58,6 +58,7 @@ from .linkers import ( XilinkDynamicLinker, CudaLinker, VisualStudioLikeLinkerMixin, + WASMDynamicLinker, ) from functools import lru_cache from .compilers import ( @@ -963,9 +964,18 @@ class Environment: if 'Emscripten' in out: cls = EmscriptenCCompiler if lang == 'c' else EmscriptenCPPCompiler self.coredata.add_lang_args(cls.language, cls, for_machine, self) + # emcc cannot be queried to get the version out of it (it + # ignores -Wl,--version and doesn't have an alternative). + # Further, wasm-id *is* lld and will return `LLD X.Y.Z` if you + # call `wasm-ld --version`, but a special version of lld that + # takes different options. + p, o, _ = Popen_safe(['wasm-ld', '--version']) + linker = WASMDynamicLinker( + compiler, for_machine, cls.LINKER_PREFIX, + [], version=search_version(o)) return cls( ccache + compiler, version, for_machine, is_cross, info, - exe_wrap, full_version=full_version) + exe_wrap, linker=linker, full_version=full_version) if 'armclang' in out: # The compiler version is not present in the first line of output, |