Skip to content

Commit

Permalink
interpreter: use typed_kwargs for build_target.link_language
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Oct 17, 2023
1 parent e06ae90 commit 0f23dc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions mesonbuild/interpreter/kwargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ class _BaseBuildTarget(TypedDict):
install_mode: FileMode
install_rpath: str
implicit_include_directories: bool
link_language: T.Optional[str]
native: MachineChoice
override_options: T.Dict[OptionKey, T.Union[str, int, bool, T.List[str]]]
depend_files: NotRequired[T.List[File]]
Expand Down
6 changes: 6 additions & 0 deletions mesonbuild/interpreter/type_checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,12 @@ def link_whole_validator(values: T.List[T.Union[StaticLibrary, CustomTarget, Cus
),
KwargInfo('build_rpath', str, default='', since='0.42.0'),
KwargInfo('install_rpath', str, default=''),
KwargInfo(
'link_language',
(str, NoneType),
validator=in_set_validator(set(compilers.all_languages)),
since='0.51.0',
),
]

def _validate_win_subsystem(value: T.Optional[str]) -> T.Optional[str]:
Expand Down

0 comments on commit 0f23dc5

Please sign in to comment.