aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-08-26 18:38:21 +0530
committerGitHub <noreply@github.com>2024-08-26 13:08:21 +0000
commitb6d5ac09b0b2acbb0f5b00232e53d0111a159063 (patch)
tree18842738e78794ba096a0af44b16d37695cff6d7 /python/servo/devenv_commands.py
parent4397d8a02156a009d16d8b79796b1e54ca635624 (diff)
downloadservo-b6d5ac09b0b2acbb0f5b00232e53d0111a159063.tar.gz
servo-b6d5ac09b0b2acbb0f5b00232e53d0111a159063.zip
mach: introduce `BuildTarget` abstraction (#33114)
Introduce a new `BuildTarget` abstraction to centralize the code for supporting different ways of choosing the build target (e.g --android, --target x86_64-linux-android , --target aarch64-linux-ohos). This is currently handled in an adhoc fashion in different commands ( mach package, install, run) leading to a proliferation of keyword parameters for the commands and duplicated logic. The patch introduces a new `allow_target_configuration` decorator to do the validation and parsing of these parameters into the appropriate `BuildTarget` subclass, which is now stored as an instance attribute of the CommandBase class. All the code that previously relied on `self.cross_compile_target` has been switched to use the BuildTarget. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r--python/servo/devenv_commands.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 60df5eb1052..0c30bc1af5b 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -205,7 +205,6 @@ class MachCommands(CommandBase):
print(logfile + " doesn't exist")
return -1
- self.cross_compile_target = target
env = self.build_env()
ndk_stack = path.join(env["ANDROID_NDK"], "ndk-stack")
self.setup_configuration_for_android_target(target)
@@ -226,8 +225,6 @@ class MachCommands(CommandBase):
@CommandArgument('--target', action='store', default="armv7-linux-androideabi",
help="Build target")
def ndk_gdb(self, release, target):
- self.cross_compile_target = target
- self.setup_configuration_for_android_target(target)
env = self.build_env()
ndk_gdb = path.join(env["ANDROID_NDK"], "ndk-gdb")
adb_path = path.join(env["ANDROID_SDK"], "platform-tools", "adb")