182efe392Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
282efe392Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
382efe392Sopenharmony_ci# you may not use this file except in compliance with the License.
482efe392Sopenharmony_ci# You may obtain a copy of the License at
582efe392Sopenharmony_ci#
682efe392Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
782efe392Sopenharmony_ci#
882efe392Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
982efe392Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1082efe392Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1182efe392Sopenharmony_ci# See the License for the specific language governing permissions and
1282efe392Sopenharmony_ci# limitations under the License.
1382efe392Sopenharmony_ci
1482efe392Sopenharmony_ciimport("../../cf.gni")
1582efe392Sopenharmony_ci
1682efe392Sopenharmony_ciconfig("coverage_flag") {
1782efe392Sopenharmony_ci  if (enable_coverage) {
1882efe392Sopenharmony_ci    cflags = [ "--coverage" ]
1982efe392Sopenharmony_ci    ldflags = [ "--coverage" ]
2082efe392Sopenharmony_ci  }
2182efe392Sopenharmony_ci}
2282efe392Sopenharmony_ci
2382efe392Sopenharmony_ciconfig("coverage_flag_cc") {
2482efe392Sopenharmony_ci  if (enable_coverage) {
2582efe392Sopenharmony_ci    cflags_cc = [ "--coverage" ]
2682efe392Sopenharmony_ci    ldflags = [ "--coverage" ]
2782efe392Sopenharmony_ci  }
2882efe392Sopenharmony_ci}
29