Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2169)

Unified Diff: build/toolchain/android/BUILD.gn

Issue 2161183003: Build libmonochrome.so with secondary toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/toolchain/android/BUILD.gn
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn
index 4a1a29f7eef579b3f97f4c45e397d7966ae05b6a..f0ef413e93f006808744a20cdb8deea4cf4fb6ae 100644
--- a/build/toolchain/android/BUILD.gn
+++ b/build/toolchain/android/BUILD.gn
@@ -59,6 +59,10 @@ template("android_gcc_toolchain") {
# Don't use .cr.so for loadable_modules since they are always loaded via
# absolute path.
loadable_module_extension = ".so"
+
+ if (defined(invoker.v8_toolchain_cpu)) {
+ v8_toolchain_cpu = invoker.v8_toolchain_cpu
+ }
}
}
@@ -73,28 +77,61 @@ template("android_gcc_toolchains_helper") {
}
}
-android_gcc_toolchains_helper("x86") {
- toolchain_cpu = "x86"
- toolchain_root = x86_android_toolchain_root
- sysroot = "$android_ndk_root/$x86_android_sysroot_subdir"
- lib_dir = "usr/lib"
- binary_prefix = "i686-linux-android"
+template("android_gcc_toolchains_x86_helper") {
+ android_gcc_toolchains_helper(target_name) {
+ toolchain_cpu = "x86"
+ toolchain_root = x86_android_toolchain_root
+ sysroot = "$android_ndk_root/$x86_android_sysroot_subdir"
+ lib_dir = "usr/lib"
+ binary_prefix = "i686-linux-android"
+ forward_variables_from(invoker, "*")
+ }
}
-android_gcc_toolchains_helper("arm") {
- toolchain_cpu = "arm"
- toolchain_root = arm_android_toolchain_root
- sysroot = "$android_ndk_root/$arm_android_sysroot_subdir"
- lib_dir = "usr/lib"
- binary_prefix = "arm-linux-androideabi"
+template("android_gcc_toolchains_arm_helper") {
+ android_gcc_toolchains_helper(target_name) {
+ toolchain_cpu = "arm"
+ toolchain_root = arm_android_toolchain_root
+ sysroot = "$android_ndk_root/$arm_android_sysroot_subdir"
+ lib_dir = "usr/lib"
+ binary_prefix = "arm-linux-androideabi"
+ forward_variables_from(invoker, "*")
+ }
}
-android_gcc_toolchains_helper("mipsel") {
- toolchain_cpu = "mipsel"
- toolchain_root = mips_android_toolchain_root
- sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
- lib_dir = "usr/lib"
- binary_prefix = "mipsel-linux-android"
+template("android_gcc_toolchains_mipsel_helper") {
+ android_gcc_toolchains_helper(target_name) {
+ toolchain_cpu = "mipsel"
+ toolchain_root = mips_android_toolchain_root
+ sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
+ lib_dir = "usr/lib"
+ binary_prefix = "mipsel-linux-android"
+ forward_variables_from(invoker, "*")
+ }
+}
+
+android_gcc_toolchains_x86_helper("x86") {
+}
+
+android_gcc_toolchains_arm_helper("arm") {
+}
+
+android_gcc_toolchains_arm_helper("mipsel") {
+}
+
+# The below toolchains which ends with _v8_foo are the secondary
+# toolchains, they define the platform v8 snapshot should be
+# built for.
+android_gcc_toolchains_arm_helper("arm_v8_arm") {
+ v8_toolchain_cpu = "arm"
agrieve 2016/07/21 16:57:46 Just one more question the comment doesn't yet ans
Dirk Pranke 2016/07/21 17:15:26 Right, this shouldn't be needed.
michaelbai 2016/07/21 17:58:05 Dirk, could you clarify what shouldn't be needed?
Dirk Pranke 2016/07/21 18:31:56 v8_toolchain_cpu will match toolchain_cpu by defau
michaelbai 2016/07/21 19:21:08 How could I miss that part! but I remember it didn
+}
+
+android_gcc_toolchains_arm_helper("mipsel_v8_mipsel") {
+ v8_toolchain_cpu = "mipsel"
+}
+
+android_gcc_toolchains_arm_helper("x86_v8_x86") {
+ v8_toolchain_cpu = "x86"
}
android_gcc_toolchains_helper("x64") {

Powered by Google App Engine
This is Rietveld 408576698