Update mozjs_sys to include cross-compilation fixes.

This commit is contained in:
Josh Matthews 2018-06-19 17:08:15 -04:00
parent a07c718895
commit 2544db1e79
2 changed files with 10 additions and 6 deletions

View file

@ -330,14 +330,18 @@ class MachCommands(CommandBase):
env['ANDROID_NDK'], "sources", "cxx-stl", "llvm-libc++", "libcxx", "include")
cxxabi_include = path.join(
env['ANDROID_NDK'], "sources", "cxx-stl", "llvm-libc++abi", "libcxxabi", "include")
sysroot_include = path.join(
env['ANDROID_SYSROOT'], "usr", "include")
env['HOST_CFLAGS'] = ''
env['CFLAGS'] = ' '.join([
"--sysroot", env['ANDROID_SYSROOT'],
"--sysroot=" + env['ANDROID_SYSROOT'],
"-I" + support_include])
env['CXXFLAGS'] = ' '.join([
"--sysroot", env['ANDROID_SYSROOT'],
"--sysroot=" + env['ANDROID_SYSROOT'],
"-I" + support_include,
"-I" + cxx_include,
"-I" + cxxabi_include])
"-I" + cxxabi_include,
"-I" + sysroot_include])
env["NDK_ANDROID_VERSION"] = android_platform.replace("android-", "")
env['CPPFLAGS'] = ' '.join(["--sysroot", env['ANDROID_SYSROOT']])
env["CMAKE_ANDROID_ARCH_ABI"] = self.config["android"]["lib"]