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") | |
8 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
9 import("//build/toolchain/gcc_toolchain.gni") | 8 import("//build/toolchain/gcc_toolchain.gni") |
10 | 9 |
11 # 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 |
12 # wrapper around gcc_toolchain to avoid duplication of logic. | 11 # wrapper around gcc_toolchain to avoid duplication of logic. |
13 # | 12 # |
14 # Parameters: | 13 # Parameters: |
15 # - android_ndk_sysroot | 14 # - android_ndk_sysroot |
16 # Sysroot for this architecture. | 15 # Sysroot for this architecture. |
17 # - android_ndk_lib_dir | 16 # - android_ndk_lib_dir |
(...skipping 22 matching lines...) Expand all Loading... |
40 assert(!use_ccache, "Goma and ccache can't be used together.") | 39 assert(!use_ccache, "Goma and ccache can't be used together.") |
41 compiler_prefix = "$goma_dir/gomacc " | 40 compiler_prefix = "$goma_dir/gomacc " |
42 } else if (use_ccache) { | 41 } else if (use_ccache) { |
43 compiler_prefix = "ccache " | 42 compiler_prefix = "ccache " |
44 } else { | 43 } else { |
45 compiler_prefix = "" | 44 compiler_prefix = "" |
46 } | 45 } |
47 | 46 |
48 is_clang = invoker.is_clang | 47 is_clang = invoker.is_clang |
49 if (is_clang) { | 48 if (is_clang) { |
50 if (use_clang_type_profiler) { | 49 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
51 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", | 50 root_build_dir) |
52 root_build_dir) | |
53 } else { | |
54 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | |
55 root_build_dir) | |
56 } | |
57 cc = "${compiler_prefix}$prefix/clang" | 51 cc = "${compiler_prefix}$prefix/clang" |
58 cxx = "${compiler_prefix}$prefix/clang++" | 52 cxx = "${compiler_prefix}$prefix/clang++" |
59 } else { | 53 } else { |
60 cc = "${compiler_prefix}${tool_prefix}gcc" | 54 cc = "${compiler_prefix}${tool_prefix}gcc" |
61 cxx = "${compiler_prefix}${tool_prefix}g++" | 55 cxx = "${compiler_prefix}${tool_prefix}g++" |
62 } | 56 } |
63 ar = tool_prefix + "ar" | 57 ar = tool_prefix + "ar" |
64 ld = cxx | 58 ld = cxx |
65 readelf = compiler_prefix + tool_prefix + "readelf" | 59 readelf = compiler_prefix + tool_prefix + "readelf" |
66 nm = compiler_prefix + tool_prefix + "nm" | 60 nm = compiler_prefix + tool_prefix + "nm" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 toolchain_cpu = "aarch64" | 122 toolchain_cpu = "aarch64" |
129 } | 123 } |
130 | 124 |
131 android_gcc_toolchains_helper("mips64el") { | 125 android_gcc_toolchains_helper("mips64el") { |
132 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 126 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
133 android_ndk_lib_dir = "usr/lib64" | 127 android_ndk_lib_dir = "usr/lib64" |
134 | 128 |
135 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 129 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
136 toolchain_cpu = "mipsel64el" | 130 toolchain_cpu = "mipsel64el" |
137 } | 131 } |
OLD | NEW |