diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-11 19:07:09 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-19 15:19:00 -0400 |
commit | 5bfab845d0bc2414e5323d2a59d6c357808c02ea (patch) | |
tree | 9941a3c2702cd542fb582d2e7426e788fbddfb6b /mesonbuild/linkers | |
parent | 0a9048e5546c17a926fd199ded798fba0f76b036 (diff) | |
download | meson-5bfab845d0bc2414e5323d2a59d6c357808c02ea.zip meson-5bfab845d0bc2414e5323d2a59d6c357808c02ea.tar.gz meson-5bfab845d0bc2414e5323d2a59d6c357808c02ea.tar.bz2 |
compilers: directly import from subpackages
It turns out we don't generally need to proxy every compiler ever
through the top-level package. The number of times we directly poke at
one is negligible and direct imports are pretty clean.
Diffstat (limited to 'mesonbuild/linkers')
-rw-r--r-- | mesonbuild/linkers/linkers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 5b7f69e..30f41af 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -137,12 +137,12 @@ class VisualStudioLikeLinker: @classmethod def unix_args_to_native(cls, args: T.List[str]) -> T.List[str]: - from ..compilers import VisualStudioCCompiler + from ..compilers.c import VisualStudioCCompiler return VisualStudioCCompiler.unix_args_to_native(args) @classmethod def native_args_to_unix(cls, args: T.List[str]) -> T.List[str]: - from ..compilers import VisualStudioCCompiler + from ..compilers.c import VisualStudioCCompiler return VisualStudioCCompiler.native_args_to_unix(args) def rsp_file_syntax(self) -> RSPFileSyntax: @@ -1126,7 +1126,7 @@ class NAGDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): return [] def get_std_shared_lib_args(self) -> T.List[str]: - from ..compilers import NAGFortranCompiler + from ..compilers.fortran import NAGFortranCompiler return NAGFortranCompiler.get_nagfor_quiet(self.version) + ['-Wl,-shared'] @@ -1495,7 +1495,7 @@ class CudaLinker(PosixDynamicLinkerMixin, DynamicLinker): # # nvcc fatal : Don't know what to do with 'subprojects/foo/libbar.so.0.1.2' # - from ..compilers import CudaCompiler + from ..compilers.cuda import CudaCompiler return CudaCompiler.LINKER_PREFIX def fatal_warnings(self) -> T.List[str]: |