1fc0b0055Sopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2fc0b0055Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3fc0b0055Sopenharmony_ci# you may not use this file except in compliance with the License.
4fc0b0055Sopenharmony_ci# You may obtain a copy of the License at
5fc0b0055Sopenharmony_ci#
6fc0b0055Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7fc0b0055Sopenharmony_ci#
8fc0b0055Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9fc0b0055Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10fc0b0055Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11fc0b0055Sopenharmony_ci# See the License for the specific language governing permissions and
12fc0b0055Sopenharmony_ci# limitations under the License.
13fc0b0055Sopenharmony_ci
14fc0b0055Sopenharmony_cideclare_args() {
15fc0b0055Sopenharmony_ci  access_token_feature_coverage = false
16fc0b0055Sopenharmony_ci}
17fc0b0055Sopenharmony_ci
18fc0b0055Sopenharmony_ciconfig("access_token_compile_flags") {
19fc0b0055Sopenharmony_ci  cflags = [
20fc0b0055Sopenharmony_ci    "-fdata-sections",
21fc0b0055Sopenharmony_ci    "-ffunction-sections",
22fc0b0055Sopenharmony_ci  ]
23fc0b0055Sopenharmony_ci  ldflags = [
24fc0b0055Sopenharmony_ci    "-Wl,--as-needed",
25fc0b0055Sopenharmony_ci    "-Wl,--gc-sections",
26fc0b0055Sopenharmony_ci  ]
27fc0b0055Sopenharmony_ci}
28fc0b0055Sopenharmony_ci
29fc0b0055Sopenharmony_ciconfig("coverage_flags") {
30fc0b0055Sopenharmony_ci  if (access_token_feature_coverage) {
31fc0b0055Sopenharmony_ci    cflags = [ "--coverage" ]
32fc0b0055Sopenharmony_ci    ldflags = [ "--coverage" ]
33fc0b0055Sopenharmony_ci  }
34fc0b0055Sopenharmony_ci}
35