diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-20 23:14:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 23:14:05 +0300 |
commit | 1ea3ddc6ad7458bbcb51704ccb5ef266c5164074 (patch) | |
tree | 62540e1b93a4844a5e5c45395a63bbfa3ec419d3 /mesonbuild/compilers/c.py | |
parent | 0384487fc52c445d005ca1ea5b2a1c83ce56200c (diff) | |
parent | 142012ab73bf1cfedb59f539400f0c18df055ec8 (diff) | |
download | meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.zip meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.tar.gz meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.tar.bz2 |
Merge pull request #5681 from dcbaker/dynamic-linker-split
split dynamic linker representations from compilers
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index f50b77c..1ec9146 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -27,6 +27,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 .compilers import ( gnu_winlibs, msvc_winlibs, @@ -112,14 +113,8 @@ class ClangCCompiler(ClangCompiler, CCompiler): def get_option_link_args(self, options): return [] - def get_linker_always_args(self): - basic = super().get_linker_always_args() - if self.compiler_type.is_osx_compiler: - return basic + ['-Wl,-headerpad_max_install_names'] - return basic - -class EmscriptenCCompiler(ClangCCompiler): +class EmscriptenCCompiler(LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, ClangCCompiler): 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.') @@ -129,18 +124,6 @@ class EmscriptenCCompiler(ClangCCompiler): 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.') @@ -293,14 +276,14 @@ class VisualStudioLikeCCompilerMixin: class VisualStudioCCompiler(VisualStudioLikeCompiler, VisualStudioLikeCCompilerMixin, CCompiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target: str): - CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target: str, **kwargs): + CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) VisualStudioLikeCompiler.__init__(self, target) self.id = 'msvc' class ClangClCCompiler(VisualStudioLikeCompiler, VisualStudioLikeCCompilerMixin, CCompiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target): - CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target, **kwargs): + CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) VisualStudioLikeCompiler.__init__(self, target) self.id = 'clang-cl' @@ -311,8 +294,8 @@ class IntelClCCompiler(IntelVisualStudioLikeCompiler, VisualStudioLikeCCompilerM __have_warned = False - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target): - CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap) + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrap, target, **kwargs): + CCompiler.__init__(self, exelist, version, for_machine, is_cross, exe_wrap, **kwargs) IntelVisualStudioLikeCompiler.__init__(self, target) def get_options(self): @@ -388,9 +371,6 @@ class CcrxCCompiler(CcrxCompiler, CCompiler): def get_output_args(self, target): return ['-output=obj=%s' % target] - def get_linker_output_args(self, outputname): - return ['-output=%s' % outputname] - def get_werror_args(self): return ['-change_message=error'] |