1# Copyright 2014 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/toolchain/rbe.gni") 6 7# Defines the configuration of cc wrapper 8# ccache: a c/c++ compiler cache which can greatly reduce recompilation times. 9# icecc, distcc: it takes compile jobs from a build and distributes them among 10# remote machines allowing a parallel build. 11# 12# TIPS 13# 14# 1) ccache 15# Set clang_use_chrome_plugins=false if using ccache 3.1.9 or earlier, since 16# these versions don't support -Xclang. (3.1.10 and later will silently 17# ignore -Xclang, so it doesn't matter if you disable clang_use_chrome_plugins 18# or not). 19# 20# Use ccache 3.2 or later to avoid clang unused argument warnings: 21# https://bugzilla.samba.org/show_bug.cgi?id=8118 22# 23# To avoid -Wparentheses-equality clang warnings, at some cost in terms of 24# speed, you can do: 25# export CCACHE_CPP2=yes 26# 27# 2) icecc 28# Set clang_use_chrome_plugins=false because icecc cannot distribute custom 29# clang libraries. 30# 31# To use icecc and ccache together, set cc_wrapper = "ccache" with 32# export CCACHE_PREFIX=icecc 33 34declare_args() { 35 # Set to "ccache", "icecc" or "distcc". Probably doesn't work on windows. 36 cc_wrapper = "" 37} 38 39assert(!use_remoteexec || cc_wrapper == "", 40 "use_remoteexec and cc_wrapper can not be used together.") 41