build: Add a get_command method to Executable
Since Executable can be used in places where ExternalProgram is, simply having a wrapper that gives them the same API is pretty useful.
This commit is contained in:
parent
eafed4b8ad
commit
b572a7980e
|
@ -1857,6 +1857,13 @@ class Executable(BuildTarget):
|
|||
def is_linkable_target(self):
|
||||
return self.is_linkwithable
|
||||
|
||||
def get_command(self) -> 'ImmutableListProtocol[str]':
|
||||
"""Provides compatibility with ExternalProgram.
|
||||
|
||||
Since you can override ExternalProgram instances with Executables.
|
||||
"""
|
||||
return self.outputs
|
||||
|
||||
class StaticLibrary(BuildTarget):
|
||||
known_kwargs = known_stlib_kwargs
|
||||
|
||||
|
|
Loading…
Reference in New Issue