1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2016 The Chromium Authors 2*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be 3*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file. 4*8975f5c5SAndroid Build Coastguard Worker 5*8975f5c5SAndroid Build Coastguard Workerimport("//build/toolchain/cc_wrapper.gni") 6*8975f5c5SAndroid Build Coastguard Workerimport("//build/toolchain/rbe.gni") 7*8975f5c5SAndroid Build Coastguard Workerimport("//build/toolchain/siso.gni") 8*8975f5c5SAndroid Build Coastguard Worker 9*8975f5c5SAndroid Build Coastguard Workerdeclare_args() { 10*8975f5c5SAndroid Build Coastguard Worker # Precompiled header file support is by default available, except on the 11*8975f5c5SAndroid Build Coastguard Worker # following scenarios: 12*8975f5c5SAndroid Build Coastguard Worker # - Remote executions or when doing official builds. 13*8975f5c5SAndroid Build Coastguard Worker # - When using cc_wrapper because ccache requires a particular configuration 14*8975f5c5SAndroid Build Coastguard Worker # and some compiler options currently not used by Chromium: 15*8975f5c5SAndroid Build Coastguard Worker # https://ccache.dev/manual/latest.html#_precompiled_headers and it isn't 16*8975f5c5SAndroid Build Coastguard Worker # supported by sccache: https://github.com/mozilla/sccache/issues/978. 17*8975f5c5SAndroid Build Coastguard Worker # - On Linux it slows down the build. 18*8975f5c5SAndroid Build Coastguard Worker enable_precompiled_headers = 19*8975f5c5SAndroid Build Coastguard Worker !is_official_build && !use_remoteexec && cc_wrapper == "" && !is_linux 20*8975f5c5SAndroid Build Coastguard Worker} 21