diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2014-12-08 13:40:23 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2014-12-09 08:20:36 +1000 |
commit | 030dab553e6ae37e2ef2cda8c897b9555d967d5d (patch) | |
tree | 82d1217ccc99793cf6897103068628a3c73c6a9f /python | |
parent | feabaf34acfc41c0976acdff5e4df15a135d1b09 (diff) | |
download | servo-030dab553e6ae37e2ef2cda8c897b9555d967d5d.tar.gz servo-030dab553e6ae37e2ef2cda8c897b9555d967d5d.zip |
Use mach to build openssl on android instead of glut makefile.
The glut makefile will be removed shortly after glutin lands
for android, so we need to build openssl for android elsewhere
in the build process.
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/build_commands.py | 12 | ||||
-rw-r--r-- | python/servo/command_base.py | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 11b2fdd08e5..e3e41ca38e2 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -63,17 +63,25 @@ class MachCommands(CommandBase): opts += ["--features", "%s" % ' '.join(features)] build_start = time() + env = self.build_env() if android: + # Build OpenSSL for android + with cd(self.android_support_dir()): + status = subprocess.call( + ["make", "-j4", "-f", "openssl.makefile"], + 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=self.build_env()) + env=env) else: status = subprocess.call( ["cargo", "build"] + opts, - env=self.build_env(), cwd=self.servo_crate()) + env=env, cwd=self.servo_crate()) elapsed = time() - build_start print("Build completed in %0.2fs" % elapsed) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index a34104b734e..2af5fcd63c1 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -145,6 +145,9 @@ class CommandBase(object): def servo_crate(self): return path.join(self.context.topdir, "components", "servo") + def android_support_dir(self): + return path.join(self.context.topdir, "support", "android") + def ensure_bootstrapped(self): if self.context.bootstrapped: return |