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
3 # found in the LICENSE file.
5 import("//build/config/sysroot.gni")
6 import("//build/toolchain/ccache.gni")
7 import("//build/toolchain/clang.gni")
8 import("//build/toolchain/gcc_toolchain.gni")
9 import("//build/toolchain/goma.gni")
12 assert(!use_ccache, "Goma and ccache can't be used together.")
13 compiler_prefix = "$goma_dir/gomacc "
14 } else if (use_ccache) {
15 compiler_prefix = "ccache "
20 gcc_toolchain("arm") {
21 cc = "${compiler_prefix}arm-linux-gnueabi-gcc"
22 cxx = "${compiler_prefix}arm-linux-gnueabi-g++"
24 ar = "arm-linux-gnueabi-ar"
26 readelf = "arm-linux-gnueabi-readelf"
27 nm = "arm-linux-gnueabi-nm"
30 toolchain_os = "linux"
34 gcc_toolchain("clang_x86") {
35 if (use_clang_type_profiler) {
36 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
39 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
42 cc = "${compiler_prefix}$prefix/clang"
43 cxx = "${compiler_prefix}$prefix/clang++"
50 toolchain_os = "linux"
54 gcc_toolchain("x86") {
55 cc = "${compiler_prefix}gcc"
56 cxx = "$compiler_prefix}g++"
64 toolchain_os = "linux"
68 gcc_toolchain("clang_x64") {
69 if (use_clang_type_profiler) {
70 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
73 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
76 cc = "${compiler_prefix}$prefix/clang"
77 cxx = "${compiler_prefix}$prefix/clang++"
85 toolchain_os = "linux"
89 gcc_toolchain("x64") {
90 cc = "${compiler_prefix}gcc"
91 cxx = "${compiler_prefix}g++"
99 toolchain_os = "linux"
103 gcc_toolchain("mipsel") {
104 cc = "mipsel-linux-gnu-gcc"
105 cxx = "mipsel-linux-gnu-g++"
106 ar = "mipsel-linux-gnu-ar"
108 readelf = "mipsel-linux-gnu-readelf"
109 nm = "mipsel-linux-gnu-nm"
111 toolchain_cpu = "mipsel"
112 toolchain_os = "linux"