Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / build / toolchain / linux / BUILD.gn
blob9145284187c94d41ce64e26908a957c2e50431e6
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
26   readelf = "arm-linux-gnueabi-readelf"
27   nm = "arm-linux-gnueabi-nm"
29   toolchain_cpu = "arm"
30   toolchain_os = "linux"
31   is_clang = false
34 gcc_toolchain("clang_x86") {
35   if (use_clang_type_profiler) {
36     prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
37                          root_build_dir)
38   } else {
39     prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
40                          root_build_dir)
41   }
42   cc = "${compiler_prefix}$prefix/clang"
43   cxx = "${compiler_prefix}$prefix/clang++"
44   readelf = "readelf"
45   nm = "nm"
46   ar = "ar"
47   ld = cxx
49   toolchain_cpu = "x86"
50   toolchain_os = "linux"
51   is_clang = true
54 gcc_toolchain("x86") {
55   cc = "${compiler_prefix}gcc"
56   cxx = "${compiler_prefix}g++"
58   readelf = "readelf"
59   nm = "nm"
60   ar = "ar"
61   ld = cxx
63   toolchain_cpu = "x86"
64   toolchain_os = "linux"
65   is_clang = false
68 gcc_toolchain("clang_x64") {
69   if (use_clang_type_profiler) {
70     prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
71                          root_build_dir)
72   } else {
73     prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
74                          root_build_dir)
75   }
76   cc = "${compiler_prefix}$prefix/clang"
77   cxx = "${compiler_prefix}$prefix/clang++"
79   readelf = "readelf"
80   nm = "nm"
81   ar = "ar"
82   ld = cxx
84   toolchain_cpu = "x64"
85   toolchain_os = "linux"
86   is_clang = true
89 gcc_toolchain("x64") {
90   cc = "${compiler_prefix}gcc"
91   cxx = "${compiler_prefix}g++"
93   readelf = "readelf"
94   nm = "nm"
95   ar = "ar"
96   ld = cxx
98   toolchain_cpu = "x64"
99   toolchain_os = "linux"
100   is_clang = false
103 gcc_toolchain("mipsel") {
104   cc = "mipsel-linux-gnu-gcc"
105   cxx = "mipsel-linux-gnu-g++"
106   ar = "mipsel-linux-gnu-ar"
107   ld = cxx
108   readelf = "mipsel-linux-gnu-readelf"
109   nm = "mipsel-linux-gnu-nm"
111   toolchain_cpu = "mipsel"
112   toolchain_os = "linux"
113   is_clang = false