mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Auto merge of #8626 - mskrzypkows:build_commands_android, r=larsbergstrom
Draft, Move OpenSSL Android build to the target directory #8568 I've created a draft, please give me feedback. Is it good direction? Fixes #8568 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8626) <!-- Reviewable:end -->
This commit is contained in:
commit
e774a69440
2 changed files with 12 additions and 2 deletions
|
@ -13,6 +13,7 @@ import os
|
|||
import os.path as path
|
||||
import subprocess
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
from time import time
|
||||
|
||||
|
@ -234,14 +235,20 @@ class MachCommands(CommandBase):
|
|||
make_cmd = ["make"]
|
||||
if jobs is not None:
|
||||
make_cmd += ["-j" + jobs]
|
||||
with cd(self.android_support_dir()):
|
||||
android_dir = self.android_build_dir(dev)
|
||||
openssl_dir = path.join(android_dir, "native", "openssl")
|
||||
if not path.exists(openssl_dir):
|
||||
os.makedirs(openssl_dir)
|
||||
shutil.copy(path.join(self.android_support_dir(), "openssl.makefile"), openssl_dir)
|
||||
shutil.copy(path.join(self.android_support_dir(), "openssl.sh"), openssl_dir)
|
||||
with cd(openssl_dir):
|
||||
status = call(
|
||||
make_cmd + ["-f", "openssl.makefile"],
|
||||
env=self.build_env(),
|
||||
verbose=verbose)
|
||||
if status:
|
||||
return status
|
||||
openssl_dir = path.join(self.android_support_dir(), "openssl-1.0.1k")
|
||||
openssl_dir = path.join(openssl_dir, "openssl-1.0.1k")
|
||||
env['OPENSSL_LIB_DIR'] = openssl_dir
|
||||
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
|
||||
env['OPENSSL_STATIC'] = 'TRUE'
|
||||
|
|
|
@ -329,6 +329,9 @@ class CommandBase(object):
|
|||
def android_support_dir(self):
|
||||
return path.join(self.context.topdir, "support", "android")
|
||||
|
||||
def android_build_dir(self, dev):
|
||||
return path.join(self.get_target_dir(), "arm-linux-androideabi", "debug" if dev else "release")
|
||||
|
||||
def ensure_bootstrapped(self):
|
||||
if self.context.bootstrapped:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue