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"
28 toolchain_os = "linux"
32 gcc_toolchain("clang_x86") {
33 if (use_clang_type_profiler) {
34 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
37 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
40 cc = "${compiler_prefix}$prefix/clang"
41 cxx = "${compiler_prefix}$prefix/clang++"
47 toolchain_os = "linux"
51 gcc_toolchain("x86") {
52 cc = "${compiler_prefix}gcc"
53 cxx = "$compiler_prefix}g++"
59 toolchain_os = "linux"
63 gcc_toolchain("clang_x64") {
64 if (use_clang_type_profiler) {
65 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
68 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
71 cc = "${compiler_prefix}$prefix/clang"
72 cxx = "${compiler_prefix}$prefix/clang++"
78 toolchain_os = "linux"
82 gcc_toolchain("x64") {
83 cc = "${compiler_prefix}gcc"
84 cxx = "${compiler_prefix}g++"
90 toolchain_os = "linux"
94 gcc_toolchain("mipsel") {
95 cc = "mipsel-linux-gnu-gcc"
96 cxx = "mipsel-linux-gnu-g++"
97 ar = "mipsel-linux-gnu-ar"
100 toolchain_cpu = "mipsel"
101 toolchain_os = "linux"