Skip to content

Commit

Permalink
Backing out some changes to build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Jul 13, 2018
1 parent dcad752 commit 421a549
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
12 changes: 5 additions & 7 deletions python/servo/build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,
sys.exit(1)

env["RUST_TARGET"] = target
env["ANDROID_TOOLCHAIN_NAME"] = android_toolchain
env["ANDROID_TOOLCHAIN_NAME"] = self.config["android"]["toolchain_prefix"]
with cd(openssl_dir):
status = call(
make_cmd + ["-f", "openssl.makefile"],
Expand All @@ -308,6 +308,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,
env['OPENSSL_LIB_DIR'] = openssl_dir
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
env['OPENSSL_STATIC'] = 'TRUE'

# Android builds also require having the gcc bits on the PATH and various INCLUDE
# path munging if you do not want to install a standalone NDK. See:
# https://dxr.mozilla.org/mozilla-central/source/build/autoconf/android.m4#139-161
Expand All @@ -322,9 +323,6 @@ def build(self, target=None, release=False, dev=False, jobs=None,
host_suffix = "x86_64"
host = os_type + "-" + host_suffix

host_clang = _get_exec_path(["clang"])
host_clangpp = _get_exec_path(["clang++"])

env['PATH'] = path.join(
env['ANDROID_NDK'], "toolchains", android_toolchain, "prebuilt", host, "bin"
) + ':' + env['PATH']
Expand All @@ -336,8 +334,8 @@ def build(self, target=None, release=False, dev=False, jobs=None,
env['ANDROID_NDK'], "sources", "cxx-stl", "llvm-libc++abi", "libcxxabi", "include")
sysroot_include = path.join(
env['ANDROID_SYSROOT'], "usr", "include")
env['HOST_CC'] = host_clang
env['HOST_CXX'] = host_clangpp
env['HOST_CC'] = _get_exec_path(["clang"])
env['HOST_CXX'] = _get_exec_path(["clang++"])
env['HOST_CFLAGS'] = ''
env['HOST_CXXFLAGS'] = ''
env['CC'] = 'clang'
Expand Down Expand Up @@ -375,7 +373,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,
if not os.path.exists(aar_out_dir):
os.makedirs(aar_out_dir)
env["AAR_OUT_DIR"] = aar_out_dir

status = self.call_rustup_run(["cargo", "build"] + opts, env=env, verbose=verbose)
elapsed = time() - build_start

Expand Down
16 changes: 8 additions & 8 deletions python/servo/command_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,34 +639,34 @@ def handle_android_target(self, target):
if target == "arm-linux-androideabi":
self.config["android"]["platform"] = "android-21"
self.config["android"]["target"] = target
self.config["android"]["toolchain_prefix"] = target
self.config["android"]["arch"] = "arm"
self.config["android"]["lib"] = "armeabi"
self.config["android"]["toolchain_name"] = "llvm"
self.config["android"]["toolchain_prefix"] = target
self.config["android"]["toolchain_name"] = target + "-4.9"
return True
elif target == "armv7-linux-androideabi":
self.config["android"]["platform"] = "android-21"
self.config["android"]["target"] = target
self.config["android"]["toolchain_prefix"] = "arm-linux-androideabi"
self.config["android"]["arch"] = "arm"
self.config["android"]["lib"] = "armeabi-v7a"
self.config["android"]["toolchain_name"] = "llvm"
self.config["android"]["toolchain_prefix"] = "arm-linux-androideabi"
self.config["android"]["toolchain_name"] = "arm-linux-androideabi-4.9"
return True
elif target == "aarch64-linux-android":
self.config["android"]["platform"] = "android-21"
self.config["android"]["target"] = target
self.config["android"]["toolchain_prefix"] = target
self.config["android"]["arch"] = "arm64"
self.config["android"]["lib"] = "arm64-v8a"
self.config["android"]["toolchain_name"] = "llvm"
self.config["android"]["toolchain_prefix"] = target
self.config["android"]["toolchain_name"] = target + "-4.9"
return True
elif target == "i686-linux-android":
self.config["android"]["platform"] = "android-21"
self.config["android"]["target"] = target
self.config["android"]["toolchain_prefix"] = "x86"
self.config["android"]["arch"] = "x86"
self.config["android"]["lib"] = "x86"
self.config["android"]["toolchain_name"] = "llvm"
self.config["android"]["toolchain_prefix"] = "x86"
self.config["android"]["toolchain_name"] = "x86-4.9"
return True
return False

Expand Down

0 comments on commit 421a549

Please sign in to comment.