summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/build.py6
-rw-r--r--mesonbuild/interpreter/interpreter.py2
-rw-r--r--mesonbuild/interpreter/kwargs.py1
-rw-r--r--mesonbuild/interpreter/type_checking.py1
4 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index cce5888c8..4a1a8189c 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -22,7 +22,7 @@ from . import programs
from .mesonlib import (
HoldableObject, SecondLevelHolder,
File, MesonException, MachineChoice, PerMachine, OrderedSet, listify,
- extract_as_list, typeslistify, stringlistify, classify_unity_sources,
+ extract_as_list, typeslistify, classify_unity_sources,
get_filenames_templates_dict, substitute_values, has_path_sep,
is_parent_path, relpath, PerMachineDefaultable,
MesonBugException, EnvironmentVariables, pickle_load, lazy_property,
@@ -85,7 +85,7 @@ if T.TYPE_CHECKING:
install_dir: T.List[T.Union[str, Literal[False]]]
install_mode: FileMode
install_rpath: str
- install_tag: T.List[str]
+ install_tag: T.List[T.Optional[str]]
language_args: T.DefaultDict[str, T.List[str]]
link_args: T.List[str]
link_depends: T.List[T.Union[str, File, CustomTarget, CustomTargetIndex]]
@@ -1292,7 +1292,7 @@ class BuildTarget(Target):
self.install_dir = typeslistify(kwargs.get('install_dir', []),
(str, bool))
self.install_mode = kwargs.get('install_mode', None)
- self.install_tag = stringlistify(kwargs.get('install_tag', [None]))
+ self.install_tag: T.List[T.Optional[str]] = kwargs.get('install_tag') or [None]
self.extra_files = kwargs.get('extra_files', [])
self.install_rpath: str = kwargs.get('install_rpath', '')
self.build_rpath = kwargs.get('build_rpath', '')
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 56659460a..e3d321e9a 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -3553,6 +3553,8 @@ class Interpreter(InterpreterBase, HoldableObject):
if isinstance(kwargs['implib'], bool):
kwargs['implib'] = None
+ kwargs['install_tag'] = [kwargs['install_tag']]
+
target = targetclass(name, self.subdir, self.subproject, for_machine, srcs, struct, objs,
self.environment, self.compilers[for_machine], kwargs)
if objs and target.uses_rust():
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py
index 4935973d9..1e206422f 100644
--- a/mesonbuild/interpreter/kwargs.py
+++ b/mesonbuild/interpreter/kwargs.py
@@ -341,6 +341,7 @@ class _BaseBuildTarget(TypedDict):
gnu_symbol_visibility: str
install: bool
install_mode: FileMode
+ install_tag: T.Optional[str]
install_rpath: str
implicit_include_directories: bool
link_depends: T.List[T.Union[str, File, build.GeneratedTypes]]
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py
index e80ed7c6d..743046caf 100644
--- a/mesonbuild/interpreter/type_checking.py
+++ b/mesonbuild/interpreter/type_checking.py
@@ -614,6 +614,7 @@ _ALL_TARGET_KWS: T.List[KwargInfo] = [
feature_validator=_target_install_feature_validator,
),
INSTALL_MODE_KW,
+ INSTALL_TAG_KW,
KwargInfo('implicit_include_directories', bool, default=True, since='0.42.0'),
NATIVE_KW,
KwargInfo('resources', ContainerTypeInfo(list, str), default=[], listify=True),