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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/clang/clang.gni") 5 import("//build/config/clang/clang.gni")
6 import("//build/config/sysroot.gni") # Imports android/config.gni. 6 import("//build/config/sysroot.gni") # Imports android/config.gni.
7 import("//build/toolchain/gcc_toolchain.gni") 7 import("//build/toolchain/gcc_toolchain.gni")
8 8
9 # The Android GCC toolchains share most of the same parameters, so we have this 9 # The Android GCC toolchains share most of the same parameters, so we have this
10 # wrapper around gcc_toolchain to avoid duplication of logic. 10 # wrapper around gcc_toolchain to avoid duplication of logic.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 ar = _tool_prefix + "ar" 53 ar = _tool_prefix + "ar"
54 ld = cxx 54 ld = cxx
55 readelf = _tool_prefix + "readelf" 55 readelf = _tool_prefix + "readelf"
56 nm = _tool_prefix + "nm" 56 nm = _tool_prefix + "nm"
57 strip = "${_tool_prefix}strip" 57 strip = "${_tool_prefix}strip"
58 58
59 # Don't use .cr.so for loadable_modules since they are always loaded via 59 # Don't use .cr.so for loadable_modules since they are always loaded via
60 # absolute path. 60 # absolute path.
61 loadable_module_extension = ".so" 61 loadable_module_extension = ".so"
62
63 if (defined(invoker.v8_toolchain_cpu)) {
64 v8_toolchain_cpu = invoker.v8_toolchain_cpu
65 }
62 } 66 }
63 } 67 }
64 68
65 template("android_gcc_toolchains_helper") { 69 template("android_gcc_toolchains_helper") {
66 android_gcc_toolchain(target_name) { 70 android_gcc_toolchain(target_name) {
67 forward_variables_from(invoker, "*") 71 forward_variables_from(invoker, "*")
68 } 72 }
69 73
70 android_gcc_toolchain("clang_$target_name") { 74 android_gcc_toolchain("clang_$target_name") {
71 forward_variables_from(invoker, "*") 75 forward_variables_from(invoker, "*")
72 is_clang = true 76 is_clang = true
73 } 77 }
74 } 78 }
75 79
76 android_gcc_toolchains_helper("x86") { 80 template("android_gcc_toolchains_x86_helper") {
77 toolchain_cpu = "x86" 81 android_gcc_toolchains_helper(target_name) {
78 toolchain_root = x86_android_toolchain_root 82 toolchain_cpu = "x86"
79 sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" 83 toolchain_root = x86_android_toolchain_root
80 lib_dir = "usr/lib" 84 sysroot = "$android_ndk_root/$x86_android_sysroot_subdir"
81 binary_prefix = "i686-linux-android" 85 lib_dir = "usr/lib"
86 binary_prefix = "i686-linux-android"
87 forward_variables_from(invoker, "*")
88 }
82 } 89 }
83 90
84 android_gcc_toolchains_helper("arm") { 91 template("android_gcc_toolchains_arm_helper") {
85 toolchain_cpu = "arm" 92 android_gcc_toolchains_helper(target_name) {
86 toolchain_root = arm_android_toolchain_root 93 toolchain_cpu = "arm"
87 sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" 94 toolchain_root = arm_android_toolchain_root
88 lib_dir = "usr/lib" 95 sysroot = "$android_ndk_root/$arm_android_sysroot_subdir"
89 binary_prefix = "arm-linux-androideabi" 96 lib_dir = "usr/lib"
97 binary_prefix = "arm-linux-androideabi"
98 forward_variables_from(invoker, "*")
99 }
90 } 100 }
91 101
92 android_gcc_toolchains_helper("mipsel") { 102 template("android_gcc_toolchains_mipsel_helper") {
93 toolchain_cpu = "mipsel" 103 android_gcc_toolchains_helper(target_name) {
94 toolchain_root = mips_android_toolchain_root 104 toolchain_cpu = "mipsel"
95 sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" 105 toolchain_root = mips_android_toolchain_root
96 lib_dir = "usr/lib" 106 sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
97 binary_prefix = "mipsel-linux-android" 107 lib_dir = "usr/lib"
108 binary_prefix = "mipsel-linux-android"
109 forward_variables_from(invoker, "*")
110 }
111 }
112
113 android_gcc_toolchains_x86_helper("x86") {
114 }
115
116 android_gcc_toolchains_arm_helper("arm") {
117 }
118
119 android_gcc_toolchains_arm_helper("mipsel") {
120 }
121
122 android_gcc_toolchains_arm_helper("arm_v8_arm") {
agrieve 2016/07/20 02:11:03 It's worth a comment about how these are different
michaelbai 2016/07/20 16:51:10 Done.
123 v8_toolchain_cpu = "arm"
124 }
125
126 android_gcc_toolchains_arm_helper("mipsel_v8_mipsel") {
127 v8_toolchain_cpu = "mipsel"
128 }
129
130 android_gcc_toolchains_arm_helper("x86_v8_x86") {
131 v8_toolchain_cpu = "x86"
98 } 132 }
99 133
100 android_gcc_toolchains_helper("x64") { 134 android_gcc_toolchains_helper("x64") {
101 toolchain_cpu = "x86_64" 135 toolchain_cpu = "x86_64"
102 toolchain_root = x86_64_android_toolchain_root 136 toolchain_root = x86_64_android_toolchain_root
103 sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" 137 sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir"
104 lib_dir = "usr/lib64" 138 lib_dir = "usr/lib64"
105 binary_prefix = "x86_64-linux-android" 139 binary_prefix = "x86_64-linux-android"
106 } 140 }
107 141
108 android_gcc_toolchains_helper("arm64") { 142 android_gcc_toolchains_helper("arm64") {
109 toolchain_cpu = "arm64" 143 toolchain_cpu = "arm64"
110 toolchain_root = arm64_android_toolchain_root 144 toolchain_root = arm64_android_toolchain_root
111 sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" 145 sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir"
112 lib_dir = "usr/lib" 146 lib_dir = "usr/lib"
113 binary_prefix = "aarch64-linux-android" 147 binary_prefix = "aarch64-linux-android"
114 } 148 }
115 149
116 android_gcc_toolchains_helper("mips64el") { 150 android_gcc_toolchains_helper("mips64el") {
117 toolchain_cpu = "mips64el" 151 toolchain_cpu = "mips64el"
118 toolchain_root = mips64_android_toolchain_root 152 toolchain_root = mips64_android_toolchain_root
119 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" 153 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir"
120 lib_dir = "usr/lib64" 154 lib_dir = "usr/lib64"
121 binary_prefix = "mips64el-linux-android" 155 binary_prefix = "mips64el-linux-android"
122 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698