Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / build / toolchain / linux / BUILD.gn
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
5 import("//build/config/sysroot.gni")
6 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/gcc_toolchain.gni")
8 import("//build/toolchain/goma.gni")
9
10 gcc_toolchain("arm") {
11   cc = "arm-linux-gnueabi-gcc"
12   cxx = "arm-linux-gnueabi-g++"
13   ar = "arm-linux-gnueabi-ar"
14   ld = cxx
15
16   toolchain_cpu_arch = "arm"
17   toolchain_os = "linux"
18 }
19
20 gcc_toolchain("x86") {
21   if (is_clang) {
22     if (use_clang_type_profiler) {
23       prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
24                            root_build_dir)
25     } else {
26       prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
27                            root_build_dir)
28     }
29     cc = "$prefix/clang"
30     cxx = "$prefix/clang++"
31   } else {
32     cc = "gcc"
33     cxx = "g++"
34   }
35
36   ar = "ar"
37   ld = cxx
38
39   toolchain_cpu_arch = "x86"
40   toolchain_os = "linux"
41 }
42
43 gcc_toolchain("x64") {
44   if (is_clang) {
45     if (use_clang_type_profiler) {
46       prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
47                            root_build_dir)
48     } else {
49       prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
50                            root_build_dir)
51     }
52     cc = "$prefix/clang"
53     cxx = "$prefix/clang++"
54   } else {
55     cc = "gcc"
56     cxx = "g++"
57   }
58
59   ar = "ar"
60   ld = cxx
61
62   toolchain_cpu_arch = "x64"
63   toolchain_os = "linux"
64 }
65
66 gcc_toolchain("mipsel") {
67   cc = "mipsel-linux-gnu-gcc"
68   cxx = "mipsel-linux-gnu-g++"
69   ar = "mipsel-linux-gnu-ar"
70   ld = cxx
71
72   toolchain_cpu_arch = "mipsel"
73   toolchain_os = "linux"
74 }