Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320)
[chromium-blink-merge.git] / build / toolchain / linux / BUILD.gn
blob7bcd9d01170e5a5a86d53e4fd69ef78eccae712c
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")
11 if (use_goma) {
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 "
16 } else {
17   compiler_prefix = ""
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"
25   ld = cxx
27   toolchain_cpu = "arm"
28   toolchain_os = "linux"
29   is_clang = false
32 gcc_toolchain("clang_x86") {
33   if (use_clang_type_profiler) {
34     prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
35                          root_build_dir)
36   } else {
37     prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
38                          root_build_dir)
39   }
40   cc = "${compiler_prefix}$prefix/clang"
41   cxx = "${compiler_prefix}$prefix/clang++"
43   ar = "ar"
44   ld = cxx
46   toolchain_cpu = "x86"
47   toolchain_os = "linux"
48   is_clang = true
51 gcc_toolchain("x86") {
52   cc = "${compiler_prefix}gcc"
53   cxx = "$compiler_prefix}g++"
55   ar = "ar"
56   ld = cxx
58   toolchain_cpu = "x86"
59   toolchain_os = "linux"
60   is_clang = false
63 gcc_toolchain("clang_x64") {
64   if (use_clang_type_profiler) {
65     prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
66                          root_build_dir)
67   } else {
68     prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
69                          root_build_dir)
70   }
71   cc = "${compiler_prefix}$prefix/clang"
72   cxx = "${compiler_prefix}$prefix/clang++"
74   ar = "ar"
75   ld = cxx
77   toolchain_cpu = "x64"
78   toolchain_os = "linux"
79   is_clang = true
82 gcc_toolchain("x64") {
83   cc = "${compiler_prefix}gcc"
84   cxx = "${compiler_prefix}g++"
86   ar = "ar"
87   ld = cxx
89   toolchain_cpu = "x64"
90   toolchain_os = "linux"
91   is_clang = false
94 gcc_toolchain("mipsel") {
95   cc = "mipsel-linux-gnu-gcc"
96   cxx = "mipsel-linux-gnu-g++"
97   ar = "mipsel-linux-gnu-ar"
98   ld = cxx
100   toolchain_cpu = "mipsel"
101   toolchain_os = "linux"
102   is_clang = false