Chromium Code Reviews| Index: build/config/android/config.gni |
| diff --git a/build/config/android/config.gni b/build/config/android/config.gni |
| index 6a9080bcf86c93da40ff1b7c30f4370dd876412b..f7d7dac49896b332794519cf681c7625ba97696d 100644 |
| --- a/build/config/android/config.gni |
| +++ b/build/config/android/config.gni |
| @@ -20,10 +20,62 @@ if (is_android) { |
| "You must specify android_src for an Android WebView build.") |
| } |
| - # android_ndk_root ----------------------------------------------------------- |
| + # Host stuff ----------------------------------------------------------------- |
|
scottmg
2014/05/12 16:33:58
i have no idea about any of this file
|
| - # Full system path to the Android NDK. |
| - android_ndk_root = rebase_path("//third_party/android_tools/ndk") |
| + # Defines the name the Android build gives to the current host CPU |
| + # architecture, which is different than the names GN uses. |
| + if (build_cpu_arch == "x64") { |
| + android_host_arch = "x86_64" |
|
awong
2014/05/12 19:23:02
ick. Is this actually a variable we wish to expose
|
| + } else if (build_cpu_arch == "x86") { |
| + android_host_arch = "x86" |
| + } else { |
| + assert(false, "Need Android toolchain support for your build CPU arch.") |
| + } |
| + |
| + # Defines the name the Android build gives to the current host CPU |
| + # architecture, which is different than the names GN uses. |
| + if (build_os == "linux") { |
| + android_host_os = "linux" |
|
awong
2014/05/12 19:23:02
Are there other android_host_os values that we wil
brettw
2014/05/12 21:00:08
They're working on Mac.
|
| + } else { |
| + assert(false, "Need Android toolchain support for your build OS.") |
| + } |
| + |
| + # Directories and files ------------------------------------------------------ |
| + # |
| + # We define may of the dirs strings here for each output architecture (rather |
| + # than just the current one) since these are needed by the Android toolchain |
| + # file to define toolchains for all possible targets in one pass. |
| + |
| + # Path to the Android NDK. |
| + android_ndk_root = "//third_party/android_tools/ndk" |
|
awong
2014/05/12 19:23:02
Not for this CL, but FYI, at some point the ndk ro
|
| + |
| + # Subdirectories inside android_ndk_root that contain the sysroot for the |
| + # associated platform. |
| + x86_android_sysroot_subdir = "platforms/android-14/arch-x86" |
|
awong
2014/05/12 19:23:02
Pull 14 out int a _android_api_level variable or s
brettw
2014/05/12 21:00:08
Done.
|
| + arm_android_sysroot_subdir = "platforms/android-14/arch-arm" |
| + mips_android_sysroot_subdir = "platforms/android-14/arch-mips" |
|
awong
2014/05/12 19:23:02
Why do we have a different variable exposed for ea
brettw
2014/05/12 21:00:08
Yes, these all need to be here since the toolchain
|
| + |
| + # Toolchain root directory for each build. The actual binaries are inside |
| + # a "bin" directory inside of these. |
| + x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-4.6/prebuilt/$android_host_os-$android_host_arch" |
|
awong
2014/05/12 19:23:02
Pull 4.6 out to something like _android_toolchain_
brettw
2014/05/12 21:00:08
Done.
|
| + arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-4.6/prebuilt/$android_host_os-$android_host_arch" |
| + mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-4.6/prebuilt/$android_host_os-$android_host_arch" |
| + |
| + # Location of libgcc. This is only needed for the current GN toolchain, so we |
| + # only need to define the current one, rather than one for every platform |
| + # like the toolchain roots. |
|
awong
2014/05/12 19:23:02
Hmm...why do we actually need this? libgcc.a is pr
brettw
2014/05/12 21:00:08
I don't know, I just copied gyp:
https://code.goog
cjhopman
2014/05/12 21:04:19
AIUI, android builds use -nostdlib simply because
awong
2014/05/12 21:34:23
Hmm...let me talk with NDK team. I thought I had u
|
| + if (cpu_arch == "x86") { |
| + android_libgcc_file = |
| + "$x86_android_toolchain_root/lib/gcc/i686-linux-android/4.6/libgcc.a" |
| + } else if (cpu_arch == "arm") { |
| + android_libgcc_file = |
| + "$arm_android_toolchain_root/lib/gcc/arm-linux-androideabi/4.6/libgcc.a" |
| + } else if (cpu_arch == "mips") { |
| + android_libgcc_file = |
| + "$mips_android_toolchain_root/lib/gcc/mipsel-linux-android/4.6/libgcc.a" |
| + } else { |
| + assert(false, "Need android libgcc support for your target arch.") |
| + } |
| # stlport stuff -------------------------------------------------------------- |