diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-03-18 14:23:06 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-03-20 18:45:56 +0200 |
commit | ac627bcea723b12e17822c18cccc9dbdeaee8b8f (patch) | |
tree | 66999769a73d0f923389f1d2ddec898421a204a1 /mesonbuild/backend/ninjabackend.py | |
parent | 44dd5535f056922294867bac2eb07b57f21bede6 (diff) | |
download | meson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.zip meson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.tar.gz meson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.tar.bz2 |
replace library type strings with an enum
This patch creates an enum for selecting libtype as static, shared,
prefer-static, or prefer-shared. This also renames 'static-shared'
with 'prefer_static' and 'shared-static' with 'prefer_shared'. This is
just a refactor with no behavioral changes or user facing changes.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 21c6c08..6446406 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -31,7 +31,7 @@ from .. import dependencies from .. import compilers from ..compilers import CompilerArgs, CCompiler, VisualStudioCCompiler, FortranCompiler from ..linkers import ArLinker -from ..mesonlib import File, MachineChoice, MesonException, OrderedSet +from ..mesonlib import File, MachineChoice, MesonException, OrderedSet, LibType from ..mesonlib import get_compiler_for_source, has_path_sep from .backends import CleanTrees from ..build import InvalidArguments @@ -2401,8 +2401,8 @@ rule FORTRAN_DEP_HACK%s # TODO The get_library_naming requirement currently excludes link targets that use d or fortran as their main linker if hasattr(linker, 'get_library_naming'): search_dirs = tuple(search_dirs) + linker.get_library_dirs(self.environment) - static_patterns = linker.get_library_naming(self.environment, 'static', strict=True) - shared_patterns = linker.get_library_naming(self.environment, 'shared', strict=True) + static_patterns = linker.get_library_naming(self.environment, LibType.STATIC, strict=True) + shared_patterns = linker.get_library_naming(self.environment, LibType.SHARED, strict=True) for libname in libs: # be conservative and record most likely shared and static resolution, because we don't know exactly # which one the linker will prefer |