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") | 5 import("//build/config/sysroot.gni") |
6 import("//build/toolchain/ccache.gni") | 6 import("//build/toolchain/ccache.gni") |
7 import("//build/toolchain/gcc_toolchain.gni") | 7 import("//build/toolchain/gcc_toolchain.gni") |
8 import("//build/toolchain/goma.gni") | 8 import("//build/toolchain/goma.gni") |
9 | 9 |
10 if (use_goma) { | 10 if (use_goma) { |
11 assert(!use_ccache, "Goma and ccache can't be used together.") | 11 assert(!use_ccache, "Goma and ccache can't be used together.") |
12 compiler_prefix = "$goma_dir/gomacc " | 12 compiler_prefix = "$goma_dir/gomacc " |
13 } else if (use_ccache) { | 13 } else if (use_ccache) { |
14 compiler_prefix = "ccache " | 14 compiler_prefix = "ccache " |
15 } else { | 15 } else { |
16 compiler_prefix = "" | 16 compiler_prefix = "" |
17 } | 17 } |
18 | 18 |
19 gcc_toolchain("arm") { | 19 gcc_toolchain("clang_arm") { |
20 cc = "${compiler_prefix}arm-linux-gnueabi-gcc" | 20 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
21 cxx = "${compiler_prefix}arm-linux-gnueabi-g++" | 21 root_build_dir) |
| 22 cc = "${compiler_prefix}$prefix/clang" |
| 23 cxx = "${compiler_prefix}$prefix/clang++" |
22 | 24 |
23 ar = "arm-linux-gnueabi-ar" | 25 toolprefix = "arm-linux-gnueabihf-" |
| 26 readelf = "${toolprefix}readelf" |
| 27 ar = "${toolprefix}ar" |
24 ld = cxx | 28 ld = cxx |
25 readelf = "arm-linux-gnueabi-readelf" | 29 readelf = "${toolprefix}readelf" |
26 nm = "arm-linux-gnueabi-nm" | 30 nm = "${toolprefix}nm" |
27 | 31 |
28 toolchain_cpu = "arm" | 32 toolchain_cpu = "arm" |
29 toolchain_os = "linux" | 33 toolchain_os = "linux" |
| 34 is_clang = true |
| 35 } |
| 36 |
| 37 gcc_toolchain("arm") { |
| 38 toolprefix = "arm-linux-gnueabihf-" |
| 39 |
| 40 cc = "${compiler_prefix}${toolprefix}gcc" |
| 41 cxx = "${compiler_prefix}${toolprefix}g++" |
| 42 |
| 43 ar = "${toolprefix}ar" |
| 44 ld = cxx |
| 45 readelf = "${toolprefix}readelf" |
| 46 nm = "${toolprefix}nm" |
| 47 |
| 48 toolchain_cpu = "arm" |
| 49 toolchain_os = "linux" |
30 is_clang = false | 50 is_clang = false |
31 } | 51 } |
32 | 52 |
33 gcc_toolchain("clang_x86") { | 53 gcc_toolchain("clang_x86") { |
34 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 54 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
35 root_build_dir) | 55 root_build_dir) |
36 cc = "${compiler_prefix}$prefix/clang" | 56 cc = "${compiler_prefix}$prefix/clang" |
37 cxx = "${compiler_prefix}$prefix/clang++" | 57 cxx = "${compiler_prefix}$prefix/clang++" |
38 readelf = "readelf" | 58 readelf = "readelf" |
39 nm = "nm" | 59 nm = "nm" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 cxx = "mipsel-linux-gnu-g++" | 114 cxx = "mipsel-linux-gnu-g++" |
95 ar = "mipsel-linux-gnu-ar" | 115 ar = "mipsel-linux-gnu-ar" |
96 ld = cxx | 116 ld = cxx |
97 readelf = "mipsel-linux-gnu-readelf" | 117 readelf = "mipsel-linux-gnu-readelf" |
98 nm = "mipsel-linux-gnu-nm" | 118 nm = "mipsel-linux-gnu-nm" |
99 | 119 |
100 toolchain_cpu = "mipsel" | 120 toolchain_cpu = "mipsel" |
101 toolchain_os = "linux" | 121 toolchain_os = "linux" |
102 is_clang = false | 122 is_clang = false |
103 } | 123 } |
OLD | NEW |