aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/build_commands.py9
-rw-r--r--python/servo/command_base.py12
-rw-r--r--python/servo/devenv_commands.py4
-rw-r--r--python/servo/post_build_commands.py6
4 files changed, 26 insertions, 5 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index ea942474063..5dc21d53e7d 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -184,9 +184,14 @@ class MachCommands(CommandBase):
default=None,
action='store_true',
help='Enable debug assertions in release')
+ @CommandArgument('--libsimpleservo',
+ default=None,
+ action='store_true',
+ help='Build the libsimpleservo library instead of the servo executable')
def build(self, target=None, release=False, dev=False, jobs=None,
features=None, android=None, no_package=False, verbose=False, very_verbose=False,
- debug_mozjs=False, params=None, with_debug_assertions=False):
+ debug_mozjs=False, params=None, with_debug_assertions=False,
+ libsimpleservo=False):
opts = params or []
@@ -254,6 +259,8 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped(target=target)
self.ensure_clobbered()
+ self.add_manifest_path(opts, android, libsimpleservo)
+
if debug_mozjs:
features += ["debugmozjs"]
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 8c9d5c61cbd..3770de6c9cd 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -672,9 +672,21 @@ install them, let us know by filing a bug!")
def ports_servo_crate(self):
return path.join(self.context.topdir, "ports", "servo")
+ def add_manifest_path(self, args, android=False, libsimpleservo=False):
+ if "--manifest-path" not in args:
+ if libsimpleservo or android:
+ manifest = self.ports_libsimpleservo_manifest()
+ else:
+ manifest = self.ports_servo_manifest()
+ args.append("--manifest-path")
+ args.append(manifest)
+
def ports_servo_manifest(self):
return path.join(self.context.topdir, "ports", "servo", "Cargo.toml")
+ def ports_libsimpleservo_manifest(self):
+ return path.join(self.context.topdir, "ports", "libsimpleservo", "Cargo.toml")
+
def servo_features(self):
"""Return a list of optional features to enable for the Servo crate"""
features = []
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 2a8d3c9f2b3..71181220b76 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -42,6 +42,8 @@ class MachCommands(CommandBase):
if check:
params = ['check'] + params
+ self.add_manifest_path(params)
+
build_start = time()
status = self.call_rustup_run(["cargo"] + params, env=env)
elapsed = time() - build_start
@@ -316,7 +318,7 @@ class MachCommands(CommandBase):
ndk_gdb,
"--adb", adb_path,
"--project", "support/android/apk/servoapp/src/main/",
- "--launch", "com.mozilla.servo.MainActivity",
+ "--launch", "org.mozilla.servo.MainActivity",
"-x", f.name,
"--verbose",
], env=env)
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index 656e230c732..dc2731c0318 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -95,7 +95,7 @@ class PostBuildCommands(CommandBase):
print("https://github.com/servo/servo/wiki/Building-for-Android#debugging-on-device")
return
script = [
- "am force-stop com.mozilla.servo",
+ "am force-stop org.mozilla.servo",
]
json_params = shell_quote(json.dumps(params))
extra = "-e servoargs " + json_params
@@ -103,9 +103,9 @@ class PostBuildCommands(CommandBase):
if rust_log:
extra += " -e servolog " + rust_log
script += [
- "am start " + extra + " com.mozilla.servo/com.mozilla.servo.MainActivity",
+ "am start " + extra + " org.mozilla.servo/org.mozilla.servo.MainActivity",
"sleep 0.5",
- "echo Servo PID: $(pidof com.mozilla.servo)",
+ "echo Servo PID: $(pidof org.mozilla.servo)",
"exit"
]
args = [self.android_adb_path(env)]