• 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/gcc_toolchain.gni")
7
8clang_toolchain("clang_arm") {
9  toolprefix = "arm-linux-gnueabihf-"
10  toolchain_args = {
11    current_cpu = "arm"
12    current_os = "linux"
13  }
14}
15
16clang_toolchain("clang_arm64") {
17  toolprefix = "aarch64-linux-gnu-"
18  toolchain_args = {
19    current_cpu = "arm64"
20    current_os = "linux"
21  }
22}
23
24gcc_toolchain("arm64") {
25  toolprefix = "aarch64-linux-gnu-"
26
27  cc = "${toolprefix}gcc"
28  cxx = "${toolprefix}g++"
29
30  ar = "${toolprefix}ar"
31  ld = cxx
32  readelf = "${toolprefix}readelf"
33  nm = "${toolprefix}nm"
34
35  toolchain_args = {
36    current_cpu = "arm64"
37    current_os = "linux"
38    is_clang = false
39  }
40}
41
42gcc_toolchain("arm") {
43  toolprefix = "arm-linux-gnueabihf-"
44
45  cc = "${toolprefix}gcc"
46  cxx = "${toolprefix}g++"
47
48  ar = "${toolprefix}ar"
49  ld = cxx
50  readelf = "${toolprefix}readelf"
51  nm = "${toolprefix}nm"
52
53  toolchain_args = {
54    current_cpu = "arm"
55    current_os = "linux"
56    is_clang = false
57  }
58}
59
60clang_toolchain("clang_x86") {
61  # Output linker map files for binary size analysis.
62  enable_linker_map = true
63
64  toolchain_args = {
65    current_cpu = "x86"
66    current_os = "linux"
67  }
68}
69
70gcc_toolchain("x86") {
71  cc = "gcc"
72  cxx = "g++"
73
74  readelf = "readelf"
75  nm = "nm"
76  ar = "ar"
77  ld = cxx
78
79  # Output linker map files for binary size analysis.
80  enable_linker_map = true
81
82  toolchain_args = {
83    current_cpu = "x86"
84    current_os = "linux"
85    is_clang = false
86  }
87}
88
89clang_toolchain("clang_x64") {
90  # Output linker map files for binary size analysis.
91  enable_linker_map = true
92
93  strip = rebase_path("${clang_base_path}/bin/llvm-strip", root_build_dir)
94  toolchain_args = {
95    current_cpu = "x64"
96    current_os = "linux"
97  }
98  shlib_extension = ".so"
99}
100
101gcc_toolchain("x64") {
102  cc = "gcc"
103  cxx = "g++"
104
105  readelf = "readelf"
106  nm = "nm"
107  ar = "ar"
108  ld = cxx
109
110  # Output linker map files for binary size analysis.
111  enable_linker_map = true
112
113  toolchain_args = {
114    current_cpu = "x64"
115    current_os = "linux"
116    is_clang = false
117  }
118}
119