mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +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 os.path as path
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import shutil
|
||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
@ -234,14 +235,20 @@ class MachCommands(CommandBase):
|
||||||
make_cmd = ["make"]
|
make_cmd = ["make"]
|
||||||
if jobs is not None:
|
if jobs is not None:
|
||||||
make_cmd += ["-j" + jobs]
|
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(
|
status = call(
|
||||||
make_cmd + ["-f", "openssl.makefile"],
|
make_cmd + ["-f", "openssl.makefile"],
|
||||||
env=self.build_env(),
|
env=self.build_env(),
|
||||||
verbose=verbose)
|
verbose=verbose)
|
||||||
if status:
|
if status:
|
||||||
return 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_LIB_DIR'] = openssl_dir
|
||||||
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
|
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
|
||||||
env['OPENSSL_STATIC'] = 'TRUE'
|
env['OPENSSL_STATIC'] = 'TRUE'
|
||||||
|
|
|
@ -329,6 +329,9 @@ class CommandBase(object):
|
||||||
def android_support_dir(self):
|
def android_support_dir(self):
|
||||||
return path.join(self.context.topdir, "support", "android")
|
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):
|
def ensure_bootstrapped(self):
|
||||||
if self.context.bootstrapped:
|
if self.context.bootstrapped:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue