Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: build/toolchain/linux/BUILD.gn

Issue 1373923004: Move gn goma setup to gcc_toolchain (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Set cc and cxx just once Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/sysroot.gni") 5 import("//build/config/sysroot.gni")
6 import("//build/toolchain/ccache.gni")
7 import("//build/toolchain/clang.gni") 6 import("//build/toolchain/clang.gni")
8 import("//build/toolchain/gcc_toolchain.gni") 7 import("//build/toolchain/gcc_toolchain.gni")
9 import("//build/toolchain/goma.gni")
10
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 = ""
18 }
19 8
20 gcc_toolchain("arm") { 9 gcc_toolchain("arm") {
21 cc = "${compiler_prefix}arm-linux-gnueabi-gcc" 10 cc = "arm-linux-gnueabi-gcc"
22 cxx = "${compiler_prefix}arm-linux-gnueabi-g++" 11 cxx = "arm-linux-gnueabi-g++"
23 12
24 ar = "arm-linux-gnueabi-ar" 13 ar = "arm-linux-gnueabi-ar"
25 ld = cxx 14 ld = cxx
26 readelf = "arm-linux-gnueabi-readelf" 15 readelf = "arm-linux-gnueabi-readelf"
27 nm = "arm-linux-gnueabi-nm" 16 nm = "arm-linux-gnueabi-nm"
28 17
29 toolchain_cpu = "arm" 18 toolchain_cpu = "arm"
30 toolchain_os = "linux" 19 toolchain_os = "linux"
31 is_clang = false 20 is_clang = false
32 } 21 }
33 22
34 gcc_toolchain("clang_x86") { 23 gcc_toolchain("clang_x86") {
35 if (use_clang_type_profiler) { 24 if (use_clang_type_profiler) {
36 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", 25 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
37 root_build_dir) 26 root_build_dir)
38 } else { 27 } else {
39 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 28 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
40 root_build_dir) 29 root_build_dir)
41 } 30 }
42 cc = "${compiler_prefix}$prefix/clang" 31 cc = "$prefix/clang"
43 cxx = "${compiler_prefix}$prefix/clang++" 32 cxx = "$prefix/clang++"
44 readelf = "readelf" 33 readelf = "readelf"
45 nm = "nm" 34 nm = "nm"
46 ar = "ar" 35 ar = "ar"
47 ld = cxx 36 ld = cxx
48 37
49 toolchain_cpu = "x86" 38 toolchain_cpu = "x86"
50 toolchain_os = "linux" 39 toolchain_os = "linux"
51 is_clang = true 40 is_clang = true
52 } 41 }
53 42
54 gcc_toolchain("x86") { 43 gcc_toolchain("x86") {
55 cc = "${compiler_prefix}gcc" 44 cc = "gcc"
56 cxx = "${compiler_prefix}g++" 45 cxx = "g++"
57 46
58 readelf = "readelf" 47 readelf = "readelf"
59 nm = "nm" 48 nm = "nm"
60 ar = "ar" 49 ar = "ar"
61 ld = cxx 50 ld = cxx
62 51
63 toolchain_cpu = "x86" 52 toolchain_cpu = "x86"
64 toolchain_os = "linux" 53 toolchain_os = "linux"
65 is_clang = false 54 is_clang = false
66 } 55 }
67 56
68 gcc_toolchain("clang_x64") { 57 gcc_toolchain("clang_x64") {
69 if (use_clang_type_profiler) { 58 if (use_clang_type_profiler) {
70 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", 59 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
71 root_build_dir) 60 root_build_dir)
72 } else { 61 } else {
73 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 62 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
74 root_build_dir) 63 root_build_dir)
75 } 64 }
76 cc = "${compiler_prefix}$prefix/clang" 65 cc = "$prefix/clang"
77 cxx = "${compiler_prefix}$prefix/clang++" 66 cxx = "$prefix/clang++"
78 67
79 readelf = "readelf" 68 readelf = "readelf"
80 nm = "nm" 69 nm = "nm"
81 ar = "ar" 70 ar = "ar"
82 ld = cxx 71 ld = cxx
83 72
84 toolchain_cpu = "x64" 73 toolchain_cpu = "x64"
85 toolchain_os = "linux" 74 toolchain_os = "linux"
86 is_clang = true 75 is_clang = true
87 } 76 }
88 77
89 gcc_toolchain("x64") { 78 gcc_toolchain("x64") {
90 cc = "${compiler_prefix}gcc" 79 cc = "gcc"
91 cxx = "${compiler_prefix}g++" 80 cxx = "g++"
92 81
93 readelf = "readelf" 82 readelf = "readelf"
94 nm = "nm" 83 nm = "nm"
95 ar = "ar" 84 ar = "ar"
96 ld = cxx 85 ld = cxx
97 86
98 toolchain_cpu = "x64" 87 toolchain_cpu = "x64"
99 toolchain_os = "linux" 88 toolchain_os = "linux"
100 is_clang = false 89 is_clang = false
101 } 90 }
102 91
103 gcc_toolchain("mipsel") { 92 gcc_toolchain("mipsel") {
104 cc = "mipsel-linux-gnu-gcc" 93 cc = "mipsel-linux-gnu-gcc"
105 cxx = "mipsel-linux-gnu-g++" 94 cxx = "mipsel-linux-gnu-g++"
106 ar = "mipsel-linux-gnu-ar" 95 ar = "mipsel-linux-gnu-ar"
107 ld = cxx 96 ld = cxx
108 readelf = "mipsel-linux-gnu-readelf" 97 readelf = "mipsel-linux-gnu-readelf"
109 nm = "mipsel-linux-gnu-nm" 98 nm = "mipsel-linux-gnu-nm"
110 99
111 toolchain_cpu = "mipsel" 100 toolchain_cpu = "mipsel"
112 toolchain_os = "linux" 101 toolchain_os = "linux"
113 is_clang = false 102 is_clang = false
103 use_ccache = false
104 use_goma = false
114 } 105 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698