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/ccache.gni") | 6 import("//build/toolchain/ccache.gni") |
7 import("//build/toolchain/clang.gni") | 7 import("//build/toolchain/clang.gni") |
8 import("//build/toolchain/goma.gni") | 8 import("//build/toolchain/goma.gni") |
9 import("//build/toolchain/gcc_toolchain.gni") | 9 import("//build/toolchain/gcc_toolchain.gni") |
10 | 10 |
11 # The Android GCC toolchains share most of the same parameters, so we have this | 11 # The Android GCC toolchains share most of the same parameters, so we have this |
12 # wrapper around gcc_toolchain to avoid duplication of logic. | 12 # wrapper around gcc_toolchain to avoid duplication of logic. |
13 # | 13 # |
14 # Parameters: | 14 # Parameters: |
15 # - android_ndk_sysroot | 15 # - android_ndk_sysroot |
16 # Sysroot for this architecture. | 16 # Sysroot for this architecture. |
17 # - android_ndk_lib_dir | 17 # - android_ndk_lib_dir |
18 # Subdirectory inside of android_ndk_sysroot where libs go. | 18 # Subdirectory inside of android_ndk_sysroot where libs go. |
19 # - tool_prefix | 19 # - tool_prefix |
20 # Prefix to be added to the tool names. | 20 # Prefix to be added to the tool names. |
21 # - toolchain_cpu_arch | 21 # - toolchain_cpu |
22 # Same as gcc_toolchain | 22 # Same as gcc_toolchain |
23 template("android_gcc_toolchain") { | 23 template("android_gcc_toolchain") { |
24 gcc_toolchain(target_name) { | 24 gcc_toolchain(target_name) { |
25 # Make our manually injected libs relative to the build dir. | 25 # Make our manually injected libs relative to the build dir. |
26 android_ndk_lib = rebase_path( | 26 android_ndk_lib = rebase_path( |
27 invoker.android_ndk_sysroot + "/" + invoker.android_ndk_lib_dir, | 27 invoker.android_ndk_sysroot + "/" + invoker.android_ndk_lib_dir, |
28 root_build_dir) | 28 root_build_dir) |
29 | 29 |
30 libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o" | 30 libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o" |
31 libs_section_postfix = "$android_ndk_lib/crtend_android.o" | 31 libs_section_postfix = "$android_ndk_lib/crtend_android.o" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 toolchain_cpu = "aarch64" | 120 toolchain_cpu = "aarch64" |
121 } | 121 } |
122 | 122 |
123 android_gcc_toolchain("mips64el") { | 123 android_gcc_toolchain("mips64el") { |
124 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 124 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
125 android_ndk_lib_dir = "usr/lib64" | 125 android_ndk_lib_dir = "usr/lib64" |
126 | 126 |
127 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 127 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
128 toolchain_cpu = "mipsel64el" | 128 toolchain_cpu = "mipsel64el" |
129 } | 129 } |
OLD | NEW |