• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4
5import("//build/config/sysroot.gni")
6import("//build/toolchain/clang.gni")
7import("//build/toolchain/gcc_toolchain.gni")
8import("//build/toolchain/goma.gni")
9
10if (use_goma) {
11  goma_prefix = "$goma_dir/gomacc "
12} else {
13  goma_prefix = ""
14}
15
16gcc_toolchain("arm") {
17  cc = "${goma_prefix}arm-linux-gnueabi-gcc"
18  cxx = "${goma_prefix}arm-linux-gnueabi-g++"
19
20  ar = "arm-linux-gnueabi-ar"
21  ld = cxx
22
23  toolchain_cpu_arch = "arm"
24  toolchain_os = "linux"
25  is_clang = false
26}
27
28gcc_toolchain("clang_x86") {
29  if (use_clang_type_profiler) {
30    prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
31                         root_build_dir)
32  } else {
33    prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
34                         root_build_dir)
35  }
36  cc = "${goma_prefix}$prefix/clang"
37  cxx = "${goma_prefix}$prefix/clang++"
38
39  ar = "ar"
40  ld = cxx
41
42  toolchain_cpu_arch = "x86"
43  toolchain_os = "linux"
44  is_clang = true
45}
46
47gcc_toolchain("x86") {
48  cc = "${goma_prefix}gcc"
49  cxx = "$goma_prefix}g++"
50
51  ar = "ar"
52  ld = cxx
53
54  toolchain_cpu_arch = "x86"
55  toolchain_os = "linux"
56  is_clang = false
57}
58
59gcc_toolchain("clang_x64") {
60  if (use_clang_type_profiler) {
61    prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
62                         root_build_dir)
63  } else {
64    prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
65                         root_build_dir)
66  }
67  cc = "${goma_prefix}$prefix/clang"
68  cxx = "${goma_prefix}$prefix/clang++"
69
70  ar = "ar"
71  ld = cxx
72
73  toolchain_cpu_arch = "x64"
74  toolchain_os = "linux"
75  is_clang = true
76}
77
78gcc_toolchain("x64") {
79  cc = "${goma_prefix}gcc"
80  cxx = "${goma_prefix}g++"
81
82  ar = "ar"
83  ld = cxx
84
85  toolchain_cpu_arch = "x64"
86  toolchain_os = "linux"
87  is_clang = false
88}
89
90gcc_toolchain("mipsel") {
91  cc = "mipsel-linux-gnu-gcc"
92  cxx = "mipsel-linux-gnu-g++"
93  ar = "mipsel-linux-gnu-ar"
94  ld = cxx
95
96  toolchain_cpu_arch = "mipsel"
97  toolchain_os = "linux"
98  is_clang = false
99}
100