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/compiler/compiler.gni") |
6 import("//build/config/sysroot.gni") # Imports android/config.gni. | 7 import("//build/config/sysroot.gni") # Imports android/config.gni. |
7 import("//build/toolchain/gcc_toolchain.gni") | 8 import("//build/toolchain/gcc_toolchain.gni") |
8 | 9 |
9 # 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 |
10 # wrapper around gcc_toolchain to avoid duplication of logic. | 11 # wrapper around gcc_toolchain to avoid duplication of logic. |
11 # | 12 # |
12 # Parameters: | 13 # Parameters: |
13 # - toolchain_root | 14 # - toolchain_root |
14 # Path to cpu-specific toolchain within the ndk. | 15 # Path to cpu-specific toolchain within the ndk. |
15 # - sysroot | 16 # - sysroot |
16 # Sysroot for this architecture. | 17 # Sysroot for this architecture. |
17 # - lib_dir | 18 # - lib_dir |
18 # Subdirectory inside of sysroot where libs go. | 19 # Subdirectory inside of sysroot where libs go. |
19 # - binary_prefix | 20 # - binary_prefix |
20 # Prefix of compiler executables. | 21 # Prefix of compiler executables. |
21 template("android_gcc_toolchain") { | 22 template("android_gcc_toolchain") { |
22 gcc_toolchain(target_name) { | 23 gcc_toolchain(target_name) { |
23 assert(defined(invoker.toolchain_args), | 24 assert(defined(invoker.toolchain_args), |
24 "toolchain_args must be defined for android_gcc_toolchain()") | 25 "toolchain_args must be defined for android_gcc_toolchain()") |
25 toolchain_args = invoker.toolchain_args | 26 toolchain_args = invoker.toolchain_args |
26 toolchain_args.current_os = "android" | 27 toolchain_args.current_os = "android" |
27 | 28 |
28 # Output linker map files for binary size analysis. | 29 # Output linker map files for binary size analysis. |
29 enable_linker_map = true | 30 # Currently disabled on LLD because of a bug (fixed upstream). |
| 31 # See https://crbug.com/716209. |
| 32 enable_linker_map = !use_lld |
30 | 33 |
31 # Make our manually injected libs relative to the build dir. | 34 # Make our manually injected libs relative to the build dir. |
32 _ndk_lib = | 35 _ndk_lib = |
33 rebase_path(invoker.sysroot + "/" + invoker.lib_dir, root_build_dir) | 36 rebase_path(invoker.sysroot + "/" + invoker.lib_dir, root_build_dir) |
34 | 37 |
35 libs_section_prefix = "$_ndk_lib/crtbegin_dynamic.o" | 38 libs_section_prefix = "$_ndk_lib/crtbegin_dynamic.o" |
36 libs_section_postfix = "$_ndk_lib/crtend_android.o" | 39 libs_section_postfix = "$_ndk_lib/crtend_android.o" |
37 | 40 |
38 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" | 41 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" |
39 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" | 42 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 139 |
137 android_gcc_toolchains_helper("mips64el") { | 140 android_gcc_toolchains_helper("mips64el") { |
138 toolchain_root = mips64_android_toolchain_root | 141 toolchain_root = mips64_android_toolchain_root |
139 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 142 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
140 lib_dir = "usr/lib64" | 143 lib_dir = "usr/lib64" |
141 binary_prefix = "mips64el-linux-android" | 144 binary_prefix = "mips64el-linux-android" |
142 toolchain_args = { | 145 toolchain_args = { |
143 current_cpu = "mips64el" | 146 current_cpu = "mips64el" |
144 } | 147 } |
145 } | 148 } |
OLD | NEW |