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

Unified Diff: build/toolchain/android/BUILD.gn

Issue 742953007: add ccache support to gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ccache usage tips 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
Index: build/toolchain/android/BUILD.gn
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn
index 9ae22183407865cf7c77e65380351f10797ddf8d..26bdd7149721ed5620573e795349b58370cd46ef 100644
--- a/build/toolchain/android/BUILD.gn
+++ b/build/toolchain/android/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/sysroot.gni") # Imports android/config.gni.
+import("//build/toolchain/ccache.gni")
import("//build/toolchain/clang.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/gcc_toolchain.gni")
@@ -36,13 +37,15 @@ template("android_gcc_toolchain") {
tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir)
if (use_goma) {
- goma_prefix = "$goma_dir/gomacc "
+ compiler_prefix = "$goma_dir/gomacc "
brettw 2014/11/26 21:18:14 Maybe here we should assert(!use_ccache, "Goma and
Mostyn Bramley-Moore 2014/11/26 22:09:52 Done (and in the linux version also).
+ } else if (use_ccache) {
+ compiler_prefix = "ccache "
} else {
- goma_prefix = ""
+ compiler_prefix = ""
}
- cc = goma_prefix + tool_prefix + "gcc"
- cxx = goma_prefix + tool_prefix + "g++"
+ cc = compiler_prefix + tool_prefix + "gcc"
+ cxx = compiler_prefix + tool_prefix + "g++"
ar = tool_prefix + "ar"
ld = cxx

Powered by Google App Engine
This is Rietveld 408576698