1# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14if (target_os == "") {
15  target_os = host_os
16}
17if (target_cpu == "") {
18  target_cpu = host_cpu
19}
20if (current_cpu == "") {
21  current_cpu = target_cpu
22}
23if (current_os == "") {
24  current_os = target_os
25}
26
27declare_args() {
28  is_debug = true
29  is_standard_system = false
30}
31
32is_linux = current_os == "linux"
33is_mingw = current_os == "mingw"
34is_mac = current_os == "mac"
35is_win = current_os == "win" || current_os == "winuwp"
36
37_shared_binary_target_configs = [ "//build:compiler_defaults" ]
38set_defaults("executable") {
39  configs = _shared_binary_target_configs
40  configs += [ "//build:executable_config" ]
41  configs += [ "//build:ldconfig" ]
42}
43set_defaults("static_library") {
44  configs = _shared_binary_target_configs
45}
46set_defaults("shared_library") {
47  configs = _shared_binary_target_configs
48  configs += [ "//build:ldconfig" ]
49}
50set_defaults("source_set") {
51  configs = _shared_binary_target_configs
52}
53
54host_toolchain = "//build/toolchain:clang-9"
55set_default_toolchain(host_toolchain)
56
57ark_standalone_build = true
58