From 18b1bf9292fc27910a52c6512b33a40e4b80b927 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 22 Jul 2019 15:20:56 -0700 Subject: compilers: Make MSVClike compilers proxy extra keyword arguments --- mesonbuild/compilers/cpp.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 5808b2e..f942114 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -473,8 +473,8 @@ class CPP11AsCPP14Mixin: class VisualStudioCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixin, VisualStudioLikeCompiler, CPPCompiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, exe_wrap, target): - CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross: bool, exe_wrap, target, **kwargs): + CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) VisualStudioLikeCompiler.__init__(self, target) self.base_options = ['b_pch', 'b_vscrt'] # FIXME add lto, pgo and the like self.id = 'msvc' @@ -506,8 +506,8 @@ class VisualStudioCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixi return args class ClangClCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixin, VisualStudioLikeCompiler, CPPCompiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target): - CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target, **kwargs): + CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) VisualStudioLikeCompiler.__init__(self, target) self.id = 'clang-cl' @@ -518,8 +518,8 @@ class ClangClCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixin, Vi class IntelClCPPCompiler(VisualStudioLikeCPPCompilerMixin, IntelVisualStudioLikeCompiler, CPPCompiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target): - CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target, **kwargs): + CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) IntelVisualStudioLikeCompiler.__init__(self, target) def get_options(self): -- cgit v1.1 From 06dcbd50eea47b3182081527ea1c0ada01d4d847 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 9 Aug 2019 13:46:35 -0700 Subject: compilers: Dispatch to dynamic linker class Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc --- mesonbuild/compilers/cpp.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index f942114..f93db3e 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -36,6 +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 def non_msvc_eh_options(eh, args): @@ -183,7 +184,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler): return ['-lstdc++'] -class EmscriptenCPPCompiler(ClangCPPCompiler): +class EmscriptenCPPCompiler(LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, ClangCPPCompiler): def __init__(self, exelist, version, compiler_type, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs): if not is_cross: raise MesonException('Emscripten compiler can only be used for cross compilation.') @@ -200,18 +201,6 @@ class EmscriptenCPPCompiler(ClangCPPCompiler): def get_option_link_args(self, options): return [] - def get_linker_always_args(self): - return [] - - def get_asneeded_args(self): - return [] - - def get_lundef_args(self): - return [] - - def build_rpath_args(self, *args, **kwargs): - return [] - def get_soname_args(self, *args, **kwargs): raise MesonException('Emscripten does not support shared libraries.') @@ -574,9 +563,6 @@ class CcrxCPPCompiler(CcrxCompiler, CPPCompiler): def get_output_args(self, target): return ['-output=obj=%s' % target] - def get_linker_output_args(self, outputname): - return ['-output=%s' % outputname] - def get_option_link_args(self, options): return [] -- cgit v1.1