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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 assert(!use_ccache, "Goma and ccache can't be used together.") | 40 assert(!use_ccache, "Goma and ccache can't be used together.") |
41 compiler_prefix = "$goma_dir/gomacc " | 41 compiler_prefix = "$goma_dir/gomacc " |
42 } else if (use_ccache) { | 42 } else if (use_ccache) { |
43 compiler_prefix = "ccache " | 43 compiler_prefix = "ccache " |
44 } else { | 44 } else { |
45 compiler_prefix = "" | 45 compiler_prefix = "" |
46 } | 46 } |
47 | 47 |
48 is_clang = invoker.is_clang | 48 is_clang = invoker.is_clang |
49 if (is_clang) { | 49 if (is_clang) { |
50 host_suffix = "" | 50 prefix = |
51 if (host_os == "linux") { | 51 rebase_path("//buildtools/${host_os}-x64/clang/bin", root_build_dir) |
52 host_suffix = "x86_64-linux" | |
53 } else if (host_os == "mac") { | |
54 host_suffix = "x86_64-darwin" | |
55 } else { | |
56 assert(false, "Unknown host") | |
57 } | |
58 | |
59 prefix = rebase_path("//buildtools/toolchain/clang+llvm-$host_suffix/bin", | |
60 root_build_dir) | |
61 | 52 |
62 cc = compiler_prefix + prefix + "/clang" | 53 cc = compiler_prefix + prefix + "/clang" |
63 cxx = compiler_prefix + prefix + "/clang++" | 54 cxx = compiler_prefix + prefix + "/clang++" |
64 ar = prefix + "/llvm-ar" | 55 ar = prefix + "/llvm-ar" |
65 } else { | 56 } else { |
66 cc = compiler_prefix + tool_prefix + "gcc" | 57 cc = compiler_prefix + tool_prefix + "gcc" |
67 cxx = compiler_prefix + tool_prefix + "g++" | 58 cxx = compiler_prefix + tool_prefix + "g++" |
68 ar = tool_prefix + "ar" | 59 ar = tool_prefix + "ar" |
69 } | 60 } |
70 | 61 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 toolchain_cpu = "x86_64" | 131 toolchain_cpu = "x86_64" |
141 } | 132 } |
142 | 133 |
143 android_gcc_toolchains_helper("arm64") { | 134 android_gcc_toolchains_helper("arm64") { |
144 android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" | 135 android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" |
145 android_ndk_lib_dir = "usr/lib" | 136 android_ndk_lib_dir = "usr/lib" |
146 | 137 |
147 tool_prefix = "$arm64_android_toolchain_root/bin/aarch64-linux-android-" | 138 tool_prefix = "$arm64_android_toolchain_root/bin/aarch64-linux-android-" |
148 toolchain_cpu = "aarch64" | 139 toolchain_cpu = "aarch64" |
149 } | 140 } |
OLD | NEW |