Skip to content

Commit

Permalink
harfbuzz and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm authored and Alan Jeffrey committed Jul 13, 2018
1 parent 3417f26 commit cb6197a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
18 changes: 6 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Expand Up @@ -28,3 +28,7 @@ mozjs = { git = "https://github.com/asajeffrey/rust-mozjs.git", branch = "smup"
# [patch."https://github.com/servo/<repository>"]
# <crate> = { path = "/path/to/local/checkout" }
cc = { path = "../cc-rs" }
harfbuzz-sys = { path = "../rust-harfbuzz/harfbuzz-sys" }
servo-fontconfig-sys = { path = "../libfontconfig" }
servo-skia = { path = "../skia" }
mozjs_sys = { path = "../mozjs" }
14 changes: 13 additions & 1 deletion python/servo/build_commands.py
Expand Up @@ -24,6 +24,7 @@
Command,
)

from mach_bootstrap import _get_exec_path
from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX
from servo.util import host_triple

Expand Down Expand Up @@ -321,6 +322,9 @@ 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 @@ -333,7 +337,13 @@ def build(self, target=None, release=False, dev=False, jobs=None,
sysroot_include = path.join(
env['ANDROID_SYSROOT'], "usr", "include")
env['HOST_CFLAGS'] = ''
env['HOST_CC'] = host_clang
env['HOST_CXX'] = host_clangpp
env['HOST_CFLAGS'] = ''
env['HOST_CXXFLAGS'] = ''
env['ANDROID_TOOLCHAIN'] = 'llvm'
env['CC'] = 'clang'
env['CPP'] = 'clang -E'
env['CXX'] = 'clang++'
gcc_toolchain = path.join(
env['ANDROID_NDK'], "toolchains", self.config["android"]["toolchain_prefix"] + "-4.9",
Expand All @@ -343,6 +353,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,
env['AR'] = path.join(gcc_toolchain_bin, "ar")
env['RANLIB'] = path.join(gcc_toolchain_bin, "ranlib")
env['OBJCOPY'] = path.join(gcc_toolchain_bin, "objcopy")
env['YASM'] = path.join(env['ANDROID_NDK'], 'prebuilt', host, 'bin', 'yasm')
env['CFLAGS'] = ' '.join([
"--sysroot=" + env['ANDROID_SYSROOT'],
"--gcc-toolchain=" + gcc_toolchain,
Expand All @@ -353,7 +364,8 @@ def build(self, target=None, release=False, dev=False, jobs=None,
"-I" + support_include,
"-I" + cxx_include,
"-I" + cxxabi_include,
"-I" + sysroot_include])
"-I" + sysroot_include,
"-D__NDK_FPABI__="])
env["NDK_ANDROID_VERSION"] = android_platform.replace("android-", "")
env['CPPFLAGS'] = ' '.join(["--sysroot", env['ANDROID_SYSROOT']])
env["CMAKE_ANDROID_ARCH_ABI"] = self.config["android"]["lib"]
Expand Down
3 changes: 2 additions & 1 deletion support/android/toolchain.cmake
Expand Up @@ -2,4 +2,5 @@ set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK})
set(CMAKE_ANDROID_API $ENV{NDK_ANDROID_VERSION})
set(CMAKE_ANDROID_ARCH_ABI $ENV{CMAKE_ANDROID_ARCH_ABI})
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
set(CMAKE_VERBOSE_MAKEFILE ON)

0 comments on commit cb6197a

Please sign in to comment.