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

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

Issue 742953007: add ccache support to gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove semicolons from assertions Created 6 years 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/ccache.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")
6 import("//build/toolchain/clang.gni") 7 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/gcc_toolchain.gni") 8 import("//build/toolchain/gcc_toolchain.gni")
8 import("//build/toolchain/goma.gni") 9 import("//build/toolchain/goma.gni")
9 10
10 if (use_goma) { 11 if (use_goma) {
11 goma_prefix = "$goma_dir/gomacc " 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 "
12 } else { 16 } else {
13 goma_prefix = "" 17 compiler_prefix = ""
14 } 18 }
15 19
16 gcc_toolchain("arm") { 20 gcc_toolchain("arm") {
17 cc = "${goma_prefix}arm-linux-gnueabi-gcc" 21 cc = "${compiler_prefix}arm-linux-gnueabi-gcc"
18 cxx = "${goma_prefix}arm-linux-gnueabi-g++" 22 cxx = "${compiler_prefix}arm-linux-gnueabi-g++"
19 23
20 ar = "arm-linux-gnueabi-ar" 24 ar = "arm-linux-gnueabi-ar"
21 ld = cxx 25 ld = cxx
22 26
23 toolchain_cpu_arch = "arm" 27 toolchain_cpu_arch = "arm"
24 toolchain_os = "linux" 28 toolchain_os = "linux"
25 is_clang = false 29 is_clang = false
26 } 30 }
27 31
28 gcc_toolchain("clang_x86") { 32 gcc_toolchain("clang_x86") {
29 if (use_clang_type_profiler) { 33 if (use_clang_type_profiler) {
30 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", 34 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
31 root_build_dir) 35 root_build_dir)
32 } else { 36 } else {
33 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 37 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
34 root_build_dir) 38 root_build_dir)
35 } 39 }
36 cc = "${goma_prefix}$prefix/clang" 40 cc = "${compiler_prefix}$prefix/clang"
37 cxx = "${goma_prefix}$prefix/clang++" 41 cxx = "${compiler_prefix}$prefix/clang++"
38 42
39 ar = "ar" 43 ar = "ar"
40 ld = cxx 44 ld = cxx
41 45
42 toolchain_cpu_arch = "x86" 46 toolchain_cpu_arch = "x86"
43 toolchain_os = "linux" 47 toolchain_os = "linux"
44 is_clang = true 48 is_clang = true
45 } 49 }
46 50
47 gcc_toolchain("x86") { 51 gcc_toolchain("x86") {
48 cc = "${goma_prefix}gcc" 52 cc = "${compiler_prefix}gcc"
49 cxx = "$goma_prefix}g++" 53 cxx = "$compiler_prefix}g++"
50 54
51 ar = "ar" 55 ar = "ar"
52 ld = cxx 56 ld = cxx
53 57
54 toolchain_cpu_arch = "x86" 58 toolchain_cpu_arch = "x86"
55 toolchain_os = "linux" 59 toolchain_os = "linux"
56 is_clang = false 60 is_clang = false
57 } 61 }
58 62
59 gcc_toolchain("clang_x64") { 63 gcc_toolchain("clang_x64") {
60 if (use_clang_type_profiler) { 64 if (use_clang_type_profiler) {
61 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", 65 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
62 root_build_dir) 66 root_build_dir)
63 } else { 67 } else {
64 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 68 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
65 root_build_dir) 69 root_build_dir)
66 } 70 }
67 cc = "${goma_prefix}$prefix/clang" 71 cc = "${compiler_prefix}$prefix/clang"
68 cxx = "${goma_prefix}$prefix/clang++" 72 cxx = "${compiler_prefix}$prefix/clang++"
69 73
70 ar = "ar" 74 ar = "ar"
71 ld = cxx 75 ld = cxx
72 76
73 toolchain_cpu_arch = "x64" 77 toolchain_cpu_arch = "x64"
74 toolchain_os = "linux" 78 toolchain_os = "linux"
75 is_clang = true 79 is_clang = true
76 } 80 }
77 81
78 gcc_toolchain("x64") { 82 gcc_toolchain("x64") {
79 cc = "${goma_prefix}gcc" 83 cc = "${compiler_prefix}gcc"
80 cxx = "${goma_prefix}g++" 84 cxx = "${compiler_prefix}g++"
81 85
82 ar = "ar" 86 ar = "ar"
83 ld = cxx 87 ld = cxx
84 88
85 toolchain_cpu_arch = "x64" 89 toolchain_cpu_arch = "x64"
86 toolchain_os = "linux" 90 toolchain_os = "linux"
87 is_clang = false 91 is_clang = false
88 } 92 }
89 93
90 gcc_toolchain("mipsel") { 94 gcc_toolchain("mipsel") {
91 cc = "mipsel-linux-gnu-gcc" 95 cc = "mipsel-linux-gnu-gcc"
92 cxx = "mipsel-linux-gnu-g++" 96 cxx = "mipsel-linux-gnu-g++"
93 ar = "mipsel-linux-gnu-ar" 97 ar = "mipsel-linux-gnu-ar"
94 ld = cxx 98 ld = cxx
95 99
96 toolchain_cpu_arch = "mipsel" 100 toolchain_cpu_arch = "mipsel"
97 toolchain_os = "linux" 101 toolchain_os = "linux"
98 is_clang = false 102 is_clang = false
99 } 103 }
OLDNEW
« no previous file with comments | « build/toolchain/ccache.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698