From 64f3174daa54a2ef8cf63df94921919717057243 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 24 Feb 2020 10:30:05 -0800 Subject: compilers/emcc: Fix inheritance order Sot hat the BasicLinkerIsCompilerMixin comes before ClangCCompiler, which hides its "call the linker" methods, as emcc doesn't have a separate linker. --- mesonbuild/compilers/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index bdca596..f6f4cfc 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -201,7 +201,7 @@ class AppleClangCPPCompiler(ClangCPPCompiler): pass -class EmscriptenCPPCompiler(LinkerEnvVarsMixin, EmscriptenMixin, BasicLinkerIsCompilerMixin, ClangCPPCompiler): +class EmscriptenCPPCompiler(BasicLinkerIsCompilerMixin, LinkerEnvVarsMixin, EmscriptenMixin, ClangCPPCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', exe_wrapper=None, **kwargs): if not is_cross: -- cgit v1.1 From 771b0d3ffbc7b034b436d4ad27be7d0a1da6b3cd Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 24 Feb 2020 10:55:31 -0800 Subject: compilers/mixins/emscripten: Implement thread support Emscripten has pthread support (as well as C++ threads), but we don't currently implement them. This fixes that by adding the necessary code. The one thing I'm not sure about is setting the pool size. The docs suggest that you really want to do this to ensure that your code works correctly, but the number should really be configurable, not sure how to set that. Fixes #6684 --- mesonbuild/compilers/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index f6f4cfc..2a244e9 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -201,7 +201,7 @@ class AppleClangCPPCompiler(ClangCPPCompiler): pass -class EmscriptenCPPCompiler(BasicLinkerIsCompilerMixin, LinkerEnvVarsMixin, EmscriptenMixin, ClangCPPCompiler): +class EmscriptenCPPCompiler(EmscriptenMixin, BasicLinkerIsCompilerMixin, LinkerEnvVarsMixin, ClangCPPCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', exe_wrapper=None, **kwargs): if not is_cross: -- cgit v1.1 From 654f427759d5aa3be55d8929b18c17a2b8fcac69 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 25 Feb 2020 11:36:31 -0800 Subject: compilers/linkers: Add a representation for wasm-ld Emscripten does have a stand alone linker, wasm-ld. This patch adds the linker, adds detection for the linker, and removes the IsLinkerMixin for emscripten. This is a little more correct, and makes the code a lot cleaner and more robust. --- mesonbuild/compilers/cpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 2a244e9..db7875b 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -36,7 +36,7 @@ from .mixins.intel import IntelGnuLikeCompiler, IntelVisualStudioLikeCompiler from .mixins.clang import ClangCompiler from .mixins.elbrus import ElbrusCompiler from .mixins.pgi import PGICompiler -from .mixins.islinker import BasicLinkerIsCompilerMixin, LinkerEnvVarsMixin +from .mixins.islinker import LinkerEnvVarsMixin from .mixins.emscripten import EmscriptenMixin if T.TYPE_CHECKING: @@ -201,7 +201,7 @@ class AppleClangCPPCompiler(ClangCPPCompiler): pass -class EmscriptenCPPCompiler(EmscriptenMixin, BasicLinkerIsCompilerMixin, LinkerEnvVarsMixin, ClangCPPCompiler): +class EmscriptenCPPCompiler(EmscriptenMixin, LinkerEnvVarsMixin, ClangCPPCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', exe_wrapper=None, **kwargs): if not is_cross: -- cgit v1.1