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/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. |
11 # | 11 # |
12 # Parameters: | 12 # Parameters: |
13 # - toolchain_root | 13 # - toolchain_root |
14 # Path to cpu-specific toolchain within the ndk. | 14 # Path to cpu-specific toolchain within the ndk. |
15 # - sysroot | 15 # - sysroot |
16 # Sysroot for this architecture. | 16 # Sysroot for this architecture. |
17 # - lib_dir | 17 # - lib_dir |
18 # Subdirectory inside of sysroot where libs go. | 18 # Subdirectory inside of sysroot where libs go. |
19 # - binary_prefix | 19 # - binary_prefix |
20 # Prefix of compiler executables. | 20 # Prefix of compiler executables. |
21 template("android_gcc_toolchain") { | 21 template("android_gcc_toolchain") { |
22 gcc_toolchain(target_name) { | 22 gcc_toolchain(target_name) { |
23 assert(defined(invoker.toolchain_args), | 23 assert(defined(invoker.toolchain_args), |
24 "toolchain_args must be defined for android_gcc_toolchain()") | 24 "toolchain_args must be defined for android_gcc_toolchain()") |
25 toolchain_args = invoker.toolchain_args | 25 toolchain_args = invoker.toolchain_args |
26 toolchain_args.current_os = "android" | 26 toolchain_args.current_os = "android" |
27 | 27 |
| 28 # Output linker map files for binary size analysis. |
| 29 enable_linker_map = true |
| 30 |
28 # Make our manually injected libs relative to the build dir. | 31 # Make our manually injected libs relative to the build dir. |
29 _ndk_lib = | 32 _ndk_lib = |
30 rebase_path(invoker.sysroot + "/" + invoker.lib_dir, root_build_dir) | 33 rebase_path(invoker.sysroot + "/" + invoker.lib_dir, root_build_dir) |
31 | 34 |
32 libs_section_prefix = "$_ndk_lib/crtbegin_dynamic.o" | 35 libs_section_prefix = "$_ndk_lib/crtbegin_dynamic.o" |
33 libs_section_postfix = "$_ndk_lib/crtend_android.o" | 36 libs_section_postfix = "$_ndk_lib/crtend_android.o" |
34 | 37 |
35 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" | 38 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" |
36 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" | 39 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" |
37 | 40 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 136 |
134 android_gcc_toolchains_helper("mips64el") { | 137 android_gcc_toolchains_helper("mips64el") { |
135 toolchain_root = mips64_android_toolchain_root | 138 toolchain_root = mips64_android_toolchain_root |
136 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 139 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
137 lib_dir = "usr/lib64" | 140 lib_dir = "usr/lib64" |
138 binary_prefix = "mips64el-linux-android" | 141 binary_prefix = "mips64el-linux-android" |
139 toolchain_args = { | 142 toolchain_args = { |
140 current_cpu = "mips64el" | 143 current_cpu = "mips64el" |
141 } | 144 } |
142 } | 145 } |
OLD | NEW |