• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 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
14# Description: Define the global variables for all components
15declare_args() {
16  # OHOS version
17  name = "OpenHarmony"
18  major = "2"
19  minor = "3"
20  revision = "beta"
21  ohos_version = "$name $major.$minor $revision"
22  ohos_build_time = ""
23  ohos_build_datetime = ""
24
25  product = ""
26  device_path = ""
27  product_path = ""
28
29  device_config_path = ""
30  product_config_path = ""
31
32  device_company = ""
33  ohos_product_adapter_dir = ""
34
35  # "debug" or "release"
36  ohos_build_type = "debug"
37  ohos_full_compile = false
38  ohos_build_compiler = ""
39  ohos_build_compiler_specified = ""
40  ohos_build_target = ""
41  ohos_build_compiler_dir = ""
42  ohos_kernel_type = ""
43  ohos_kernel_is_prebuilt = false
44  use_board_toolchain = true
45
46  # hb set it to true if ccache installed.
47  ohos_build_enable_ccache = false
48
49  # Current toolchain cc command. E.g. "/data/user1/riscv32/bin/riscv32-unknown-elf-gcc".
50  ohos_current_cc_command = ""
51  ohos_current_cxx_command = ""
52  ohos_current_ar_command = ""
53  ohos_current_ld_command = ""
54  ohos_current_strip_command = ""
55
56  # Current sysroot path. E.g. "//out/hispark_taurus/ipcamera_hispark_taurus/sysroot".
57  ohos_current_sysroot = "$root_out_dir/sysroot"
58}
59
60if (product_config_path != "") {
61  product_config = read_file("${product_config_path}/config.json", "json")
62
63  # Board selected by product.
64  board_name = product_config.board
65  device_company = product_config.device_company
66
67  # Supported kernel: "liteos_a", "liteos_m", "linux", "uniproton"
68  ohos_kernel_type = product_config.kernel_type
69  if (defined(product_config.kernel_is_prebuilt)) {
70    ohos_kernel_is_prebuilt = product_config.kernel_is_prebuilt
71  }
72
73  # To be deleted, and will use board config.
74  if (defined(product_config.vendor_adapter_dir)) {
75    ohos_vendor_adapter_dir = product_config.vendor_adapter_dir
76    ohos_board_adapter_dir = ohos_vendor_adapter_dir
77  }
78  ohos_product_adapter_dir = product_config.product_adapter_dir
79  ohos_third_party_dir = product_config.third_party_dir
80}
81
82ohos_build_user = "jenkins"
83ohos_build_host = host_os
84ohos_build_roothash = ""
85ohos_root_path = rebase_path("//")
86ohos_lite = true
87
88# Testing switches
89LOSCFG_TEST_JS_BUILD = false
90LOSCFG_TEST_MLF_BUILD = false
91LOSCFG_TEST_C_BUILD = false
92LOSCFG_TEST_APPS = false
93
94declare_args() {
95  enable_ohos_hiview = true
96  enable_ohos_hiview_event = true
97  enable_ohos_hiview_platform = false
98}
99
100declare_args() {
101  enable_tee_ree = false
102  enable_ohos_security_dmverity = false
103}
104
105declare_args() {
106  ohos_build_userspace_only = false
107}
108