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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain/ccache.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/linux/BUILD.gn
diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn
index a98ea53c95cecd5613c24ea476ce5089f35a7702..1d17772222f0bea73dc3a8601ed3b512a7f63dc3 100644
--- a/build/toolchain/linux/BUILD.gn
+++ b/build/toolchain/linux/BUILD.gn
@@ -3,19 +3,23 @@
# found in the LICENSE file.
import("//build/config/sysroot.gni")
+import("//build/toolchain/ccache.gni")
import("//build/toolchain/clang.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//build/toolchain/goma.gni")
if (use_goma) {
- goma_prefix = "$goma_dir/gomacc "
+ assert(!use_ccache, "Goma and ccache can't be used together.")
+ compiler_prefix = "$goma_dir/gomacc "
+} else if (use_ccache) {
+ compiler_prefix = "ccache "
} else {
- goma_prefix = ""
+ compiler_prefix = ""
}
gcc_toolchain("arm") {
- cc = "${goma_prefix}arm-linux-gnueabi-gcc"
- cxx = "${goma_prefix}arm-linux-gnueabi-g++"
+ cc = "${compiler_prefix}arm-linux-gnueabi-gcc"
+ cxx = "${compiler_prefix}arm-linux-gnueabi-g++"
ar = "arm-linux-gnueabi-ar"
ld = cxx
@@ -33,8 +37,8 @@ gcc_toolchain("clang_x86") {
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
}
- cc = "${goma_prefix}$prefix/clang"
- cxx = "${goma_prefix}$prefix/clang++"
+ cc = "${compiler_prefix}$prefix/clang"
+ cxx = "${compiler_prefix}$prefix/clang++"
ar = "ar"
ld = cxx
@@ -45,8 +49,8 @@ gcc_toolchain("clang_x86") {
}
gcc_toolchain("x86") {
- cc = "${goma_prefix}gcc"
- cxx = "$goma_prefix}g++"
+ cc = "${compiler_prefix}gcc"
+ cxx = "$compiler_prefix}g++"
ar = "ar"
ld = cxx
@@ -64,8 +68,8 @@ gcc_toolchain("clang_x64") {
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
}
- cc = "${goma_prefix}$prefix/clang"
- cxx = "${goma_prefix}$prefix/clang++"
+ cc = "${compiler_prefix}$prefix/clang"
+ cxx = "${compiler_prefix}$prefix/clang++"
ar = "ar"
ld = cxx
@@ -76,8 +80,8 @@ gcc_toolchain("clang_x64") {
}
gcc_toolchain("x64") {
- cc = "${goma_prefix}gcc"
- cxx = "${goma_prefix}g++"
+ cc = "${compiler_prefix}gcc"
+ cxx = "${compiler_prefix}g++"
ar = "ar"
ld = cxx
« 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