diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2014-12-11 15:13:26 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2014-12-12 08:13:04 +1000 |
commit | 9d192de63dfff70dacd9372f6523d0852f865c49 (patch) | |
tree | 34f855a1abf82ea20d4b1939fd349d8b3d3d905a /python/servo/build_commands.py | |
parent | 80756a11d2fc9dbc67eda580e7ed9c22b354647e (diff) | |
download | servo-9d192de63dfff70dacd9372f6523d0852f865c49.tar.gz servo-9d192de63dfff70dacd9372f6523d0852f865c49.zip |
Switch android to glutin.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 26 |
1 files changed, 15 insertions, 11 deletions
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) |