xref: /aosp_15_r20/external/angle/build/toolchain/cc_wrapper.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
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, sccache: c/c++ compiler caches which can greatly reduce recompilation
9#                  times.
10# icecc, distcc: it takes compile jobs from a build and distributes them among
11#                remote machines allowing a parallel build.
12#
13# TIPS
14#
15# 1) ccache
16# Set clang_use_chrome_plugins=false if using ccache 3.1.9 or earlier, since
17# these versions don't support -Xclang.  (3.1.10 and later will silently
18# ignore -Xclang, so it doesn't matter if you disable clang_use_chrome_plugins
19# or not).
20#
21# Use ccache 3.2 or later to avoid clang unused argument warnings:
22# https://bugzilla.samba.org/show_bug.cgi?id=8118
23#
24# 2) icecc
25# Set clang_use_chrome_plugins=false because icecc cannot distribute custom
26# clang libraries.
27#
28# To use icecc and ccache together, set cc_wrapper = "ccache" with
29# export CCACHE_PREFIX=icecc
30
31declare_args() {
32  # Set to "ccache", "sccache", "icecc" or "distcc".
33  cc_wrapper = ""
34}
35
36assert(!use_remoteexec || cc_wrapper == "",
37       "use_remoteexec and cc_wrapper can not be used together.")
38