xref: /aosp_15_r20/external/angle/build/config/profiling/profiling.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2020 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/config/compiler/pgo/pgo.gni")
6*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/coverage/coverage.gni")
7*8975f5c5SAndroid Build Coastguard Worker
8*8975f5c5SAndroid Build Coastguard Workerdeclare_args() {
9*8975f5c5SAndroid Build Coastguard Worker  use_clang_profiling =
10*8975f5c5SAndroid Build Coastguard Worker      is_a_target_toolchain && (use_clang_coverage || chrome_pgo_phase == 1)
11*8975f5c5SAndroid Build Coastguard Worker}
12*8975f5c5SAndroid Build Coastguard Worker
13*8975f5c5SAndroid Build Coastguard Workerassert(!use_clang_profiling || is_clang,
14*8975f5c5SAndroid Build Coastguard Worker       "Clang Source-based profiling requires clang.")
15