OLD | NEW |
---|---|
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/sysroot.gni") # Imports android/config.gni. | 5 import("//build/config/sysroot.gni") # Imports android/config.gni. |
6 import("//build/toolchain/clang.gni") | 6 import("//build/toolchain/clang.gni") |
7 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
8 import("//build/toolchain/gcc_toolchain.gni") | 8 import("//build/toolchain/gcc_toolchain.gni") |
9 | 9 |
10 # The Android GCC toolchains share most of the same parameters, so we have this | 10 # The Android GCC toolchains share most of the same parameters, so we have this |
(...skipping 21 matching lines...) Expand all Loading... | |
32 # The tools should be run relative to the build dir. | 32 # The tools should be run relative to the build dir. |
33 tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir) | 33 tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir) |
34 | 34 |
35 cc = tool_prefix + "gcc" | 35 cc = tool_prefix + "gcc" |
36 cxx = tool_prefix + "g++" | 36 cxx = tool_prefix + "g++" |
37 ar = tool_prefix + "ar" | 37 ar = tool_prefix + "ar" |
38 ld = cxx | 38 ld = cxx |
39 | 39 |
40 toolchain_os = "android" | 40 toolchain_os = "android" |
41 toolchain_cpu_arch = invoker.toolchain_cpu_arch | 41 toolchain_cpu_arch = invoker.toolchain_cpu_arch |
42 | |
43 android_strip = "${tool_prefix}strip" | |
44 mkdir_command = "mkdir -p lib.stripped" | |
cjhopman
2014/07/07 23:00:50
This mkdir isn't needed if ninja knows about the o
brettw
2014/07/08 22:06:54
Can you add a comment above this line about why it
Nico
2014/07/08 23:02:29
Can we not use mkdir? It's not available on Window
cjhopman
2014/07/11 20:48:50
The right way to do this is to tell ninja about th
| |
45 strip_command = "$android_strip --strip-unneeded -o lib.stripped/\$soname.tm p \$lib" | |
46 replace_command = "if ! cmp -s lib.stripped/\${soname}.tmp lib.stripped/\${s oname}; then mv lib.stripped/\${soname}.tmp lib.stripped/\${soname}; fi" | |
47 postsolink = "$mkdir_command && $strip_command && $replace_command" | |
42 } | 48 } |
43 } | 49 } |
44 | 50 |
45 android_gcc_toolchain("x86") { | 51 android_gcc_toolchain("x86") { |
46 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" | 52 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" |
47 android_ndk_lib_dir = "usr/lib" | 53 android_ndk_lib_dir = "usr/lib" |
48 | 54 |
49 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" | 55 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" |
50 toolchain_cpu_arch = "x86" | 56 toolchain_cpu_arch = "x86" |
51 } | 57 } |
52 | 58 |
53 android_gcc_toolchain("arm") { | 59 android_gcc_toolchain("arm") { |
54 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" | 60 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" |
55 android_ndk_lib_dir = "usr/lib" | 61 android_ndk_lib_dir = "usr/lib" |
56 | 62 |
57 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" | 63 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" |
58 toolchain_cpu_arch = "arm" | 64 toolchain_cpu_arch = "arm" |
59 } | 65 } |
60 | 66 |
61 android_gcc_toolchain("mipsel") { | 67 android_gcc_toolchain("mipsel") { |
62 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" | 68 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" |
63 android_ndk_lib_dir = "usr/lib" | 69 android_ndk_lib_dir = "usr/lib" |
64 | 70 |
65 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" | 71 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" |
66 toolchain_cpu_arch = "mipsel" | 72 toolchain_cpu_arch = "mipsel" |
67 } | 73 } |
OLD | NEW |