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

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

Issue 397173004: Make goma work for the GN build on linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« build/toolchain/goma.gni ('K') | « build/toolchain/goma.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/clang.gni") 6 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/gcc_toolchain.gni") 7 import("//build/toolchain/gcc_toolchain.gni")
8 import("//build/toolchain/goma.gni") 8 import("//build/toolchain/goma.gni")
9 9
10 if (use_goma) {
11 goma_prefix = "$goma_dir/gomacc "
12 } else {
13 goma_prefix = ""
14 }
15
10 gcc_toolchain("arm") { 16 gcc_toolchain("arm") {
11 cc = "arm-linux-gnueabi-gcc" 17 cc = "${goma_prefix}arm-linux-gnueabi-gcc"
12 cxx = "arm-linux-gnueabi-g++" 18 cxx = "${goma_prefix}arm-linux-gnueabi-g++"
Dirk Pranke 2014/07/17 01:18:27 this seemed like the safest and clearest approach
19
13 ar = "arm-linux-gnueabi-ar" 20 ar = "arm-linux-gnueabi-ar"
14 ld = cxx 21 ld = cxx
15 22
16 toolchain_cpu_arch = "arm" 23 toolchain_cpu_arch = "arm"
17 toolchain_os = "linux" 24 toolchain_os = "linux"
18 is_clang = false 25 is_clang = false
19 } 26 }
20 27
21 gcc_toolchain("clang_x86") { 28 gcc_toolchain("clang_x86") {
22 if (use_clang_type_profiler) { 29 if (use_clang_type_profiler) {
23 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", 30 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
24 root_build_dir) 31 root_build_dir)
25 } else { 32 } else {
26 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 33 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
27 root_build_dir) 34 root_build_dir)
28 } 35 }
29 cc = "$prefix/clang" 36 cc = "${goma_prefix}$prefix/clang"
30 cxx = "$prefix/clang++" 37 cxx = "${goma_prefix}$prefix/clang++"
31 38
32 ar = "ar" 39 ar = "ar"
33 ld = cxx 40 ld = cxx
34 41
35 toolchain_cpu_arch = "x86" 42 toolchain_cpu_arch = "x86"
36 toolchain_os = "linux" 43 toolchain_os = "linux"
37 is_clang = true 44 is_clang = true
38 } 45 }
39 46
40 gcc_toolchain("x86") { 47 gcc_toolchain("x86") {
41 cc = "gcc" 48 cc = "${goma_prefix}gcc"
42 cxx = "g++" 49 cxx = "$goma_prefix}g++"
43 50
44 ar = "ar" 51 ar = "ar"
45 ld = cxx 52 ld = cxx
46 53
47 toolchain_cpu_arch = "x86" 54 toolchain_cpu_arch = "x86"
48 toolchain_os = "linux" 55 toolchain_os = "linux"
49 is_clang = false 56 is_clang = false
50 } 57 }
51 58
52 gcc_toolchain("clang_x64") { 59 gcc_toolchain("clang_x64") {
53 if (use_clang_type_profiler) { 60 if (use_clang_type_profiler) {
54 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", 61 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
55 root_build_dir) 62 root_build_dir)
56 } else { 63 } else {
57 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 64 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
58 root_build_dir) 65 root_build_dir)
59 } 66 }
60 cc = "$prefix/clang" 67 cc = "${goma_prefix}$prefix/clang"
61 cxx = "$prefix/clang++" 68 cxx = "${goma_prefix}$prefix/clang++"
62 69
63 ar = "ar" 70 ar = "ar"
64 ld = cxx 71 ld = cxx
65 72
66 toolchain_cpu_arch = "x64" 73 toolchain_cpu_arch = "x64"
67 toolchain_os = "linux" 74 toolchain_os = "linux"
68 is_clang = true 75 is_clang = true
69 } 76 }
70 77
71 gcc_toolchain("x64") { 78 gcc_toolchain("x64") {
72 cc = "gcc" 79 cc = "${goma_prefix}gcc"
73 cxx = "g++" 80 cxx = "${goma_prefix}g++"
74 81
75 ar = "ar" 82 ar = "ar"
76 ld = cxx 83 ld = cxx
77 84
78 toolchain_cpu_arch = "x64" 85 toolchain_cpu_arch = "x64"
79 toolchain_os = "linux" 86 toolchain_os = "linux"
80 is_clang = false 87 is_clang = false
81 } 88 }
82 89
83 gcc_toolchain("mipsel") { 90 gcc_toolchain("mipsel") {
Dirk Pranke 2014/07/17 01:18:27 any idea if goma supports the mipsel toolchain?
Nico 2014/07/17 01:21:47 As far as I know, no. I'm aware of a single mips b
brettw 2014/07/17 04:37:30 I don't touch any mips thing. The mips people cont
84 cc = "mipsel-linux-gnu-gcc" 91 cc = "mipsel-linux-gnu-gcc"
85 cxx = "mipsel-linux-gnu-g++" 92 cxx = "mipsel-linux-gnu-g++"
86 ar = "mipsel-linux-gnu-ar" 93 ar = "mipsel-linux-gnu-ar"
87 ld = cxx 94 ld = cxx
88 95
89 toolchain_cpu_arch = "mipsel" 96 toolchain_cpu_arch = "mipsel"
90 toolchain_os = "linux" 97 toolchain_os = "linux"
91 is_clang = false 98 is_clang = false
92 } 99 }
OLDNEW
« build/toolchain/goma.gni ('K') | « build/toolchain/goma.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698