# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FUZZ_OUTPUT_PATH = "hdc/hdc"

declare_args() {
  # build with --gn-args "hdc_debug=true, which is used to debug"
  hdc_debug = false
  hdc_host_hide_debug_win = true
  hdc_support_uart = true
  hdc_test_coverage = false
  hdc_jdwp_test = false
  js_jdwp_connect = true
  hdc_version_check = false
  support_hdcd_user_permit = false
  hdc_feature_support_sudo = false
  hdc_support_account_constraint = true
  hdc_feature_support_credential = false
  hdc_feature_support_report_command_event = false
  hdc_feature_support_usr_symlink = false

  if (defined(global_parts_info)) {
    if (defined(global_parts_info.ability_ability_base)) {
      support_hdcd_user_permit = true
    }
  }
}

code_check_flag = [
  "-Wformat",
  "-Wall",
  "-Wmissing-field-initializers",
  "-Wuninitialized",
  "-Wnull-pointer-arithmetic",
  "-Wunused-lambda-capture",
  "-Wuser-defined-warnings",
  "-Wenum-compare-switch",
  "-Wunneeded-internal-declaration",
  "-Wundefined-var-template",
  "-Wnonportable-include-path",
  "-Wformat-extra-args",
  "-Wformat",
  "-Wsign-compare",
  "-Woverloaded-virtual",
]