From 9d192de63dfff70dacd9372f6523d0852f865c49 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Thu, 11 Dec 2014 15:13:26 +1000 Subject: Switch android to glutin. --- python/servo/build_commands.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'python/servo/build_commands.py') diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index cade77fbbd7..a283b0d6c91 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -46,6 +46,8 @@ class MachCommands(CommandBase): android = self.config["build"]["android"] opts = [] + features = [] + if release: opts += ["--release"] if target: @@ -54,8 +56,17 @@ class MachCommands(CommandBase): opts += ["-j", jobs] if verbose: opts += ["-v"] + if android: + # Ensure the APK builder submodule has been built first + apk_builder_dir = "support/android-rs-glue" + with cd(path.join(apk_builder_dir, "apk-builder")): + subprocess.call(["cargo", "build"], env=self.build_env()) + + # FIXME: This can be simplified when glutin becomes the default + # and glfw has been removed. + opts += ["--target", "arm-linux-androideabi", "--no-default-features"] + features += ["glutin"] - features = [] if debug_mozjs or self.config["build"]["debug-mozjs"]: features += ["script/debugmozjs"] @@ -72,16 +83,9 @@ class MachCommands(CommandBase): env=self.build_env()) env['OPENSSL_PATH'] = path.join(self.android_support_dir(), "openssl-1.0.1j") - make_opts = [] - if opts: - make_opts += ["CARGO_OPTS=" + " ".join(opts)] - status = subprocess.call( - ["make", "-C", "ports/android"] + make_opts, - env=env) - else: - status = subprocess.call( - ["cargo", "build"] + opts, - env=env, cwd=self.servo_crate()) + status = subprocess.call( + ["cargo", "build"] + opts, + env=env, cwd=self.servo_crate()) elapsed = time() - build_start print("Build completed in %0.2fs" % elapsed) -- cgit v1.2.3