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

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: 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/config/compiler/BUILD.gn ('k') | build/toolchain/ccache.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/android/BUILD.gn
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn
index 9ae22183407865cf7c77e65380351f10797ddf8d..78ef8477c44bf0c1abe4833c4f7b2206ec6b6de8 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,16 @@ template("android_gcc_toolchain") {
tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir)
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 = ""
}
- 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
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/toolchain/ccache.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698