|
|
|
@ -1877,17 +1877,12 @@ class Interpreter(InterpreterBase, HoldableObject): |
|
|
|
|
kwargs: kwtypes.BuildTarget |
|
|
|
|
) -> T.Union[build.Executable, build.StaticLibrary, build.SharedLibrary, |
|
|
|
|
build.SharedModule, build.BothLibraries, build.Jar]: |
|
|
|
|
if 'target_type' not in kwargs: |
|
|
|
|
raise InterpreterException('Missing target_type keyword argument') |
|
|
|
|
target_type = kwargs.pop('target_type') |
|
|
|
|
target_type = kwargs['target_type'] |
|
|
|
|
if target_type == 'executable': |
|
|
|
|
return self.build_target(node, args, kwargs, build.Executable) |
|
|
|
|
elif target_type == 'shared_library': |
|
|
|
|
return self.build_target(node, args, kwargs, build.SharedLibrary) |
|
|
|
|
elif target_type == 'shared_module': |
|
|
|
|
FeatureNew.single_use( |
|
|
|
|
'build_target(target_type: \'shared_module\')', |
|
|
|
|
'0.51.0', self.subproject, location=node) |
|
|
|
|
return self.build_target(node, args, kwargs, build.SharedModule) |
|
|
|
|
elif target_type == 'static_library': |
|
|
|
|
return self.build_target(node, args, kwargs, build.StaticLibrary) |
|
|
|
@ -1895,10 +1890,7 @@ class Interpreter(InterpreterBase, HoldableObject): |
|
|
|
|
return self.build_both_libraries(node, args, kwargs) |
|
|
|
|
elif target_type == 'library': |
|
|
|
|
return self.build_library(node, args, kwargs) |
|
|
|
|
elif target_type == 'jar': |
|
|
|
|
return self.build_target(node, args, kwargs, build.Jar) |
|
|
|
|
else: |
|
|
|
|
raise InterpreterException('Unknown target_type.') |
|
|
|
|
return self.build_target(node, args, kwargs, build.Jar) |
|
|
|
|
|
|
|
|
|
@noPosargs |
|
|
|
|
@typed_kwargs( |
|
|
|
|