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_company = "" 30 ohos_product_adapter_dir = "" 31 32 # "debug" or "release" 33 ohos_build_type = "debug" 34 ohos_full_compile = false 35 ohos_build_compiler = "" 36 ohos_build_compiler_specified = "" 37 ohos_build_target = "" 38 ohos_build_compiler_dir = "" 39 ohos_kernel_type = "" 40 ohos_kernel_is_prebuilt = false 41 use_board_toolchain = true 42 43 # hb set it to true if ccache installed. 44 ohos_build_enable_ccache = false 45 46 # Current toolchain cc command. E.g. "/data/user1/riscv32/bin/riscv32-unknown-elf-gcc". 47 ohos_current_cc_command = "" 48 ohos_current_cxx_command = "" 49 ohos_current_ar_command = "" 50 ohos_current_ld_command = "" 51 ohos_current_strip_command = "" 52 53 # Current sysroot path. E.g. "//prebuilts/lite/sysroot". 54 ohos_current_sysroot = "$root_out_dir/sysroot" 55} 56 57if (product_path != "") { 58 product_config = read_file("${product_path}/config.json", "json") 59 60 # Board selected by product. 61 board_name = product_config.board 62 device_company = product_config.device_company 63 64 # Supported kernel: "liteos_a", "liteos_m", "linux" 65 ohos_kernel_type = product_config.kernel_type 66 if (defined(product_config.kernel_is_prebuilt)) { 67 ohos_kernel_is_prebuilt = product_config.kernel_is_prebuilt 68 } 69 70 # To be deleted, and will use board config. 71 if (defined(product_config.vendor_adapter_dir)) { 72 ohos_vendor_adapter_dir = product_config.vendor_adapter_dir 73 ohos_board_adapter_dir = ohos_vendor_adapter_dir 74 } 75 ohos_product_adapter_dir = product_config.product_adapter_dir 76 ohos_third_party_dir = product_config.third_party_dir 77} 78 79ohos_build_user = "jenkins" 80ohos_build_host = host_os 81ohos_build_roothash = "" 82ohos_root_path = rebase_path("//") 83ohos_lite = true 84 85# Testing switches 86LOSCFG_TEST_JS_BUILD = false 87LOSCFG_TEST_MLF_BUILD = false 88LOSCFG_TEST_C_BUILD = false 89LOSCFG_TEST_APPS = false 90 91declare_args() { 92 enable_ohos_hiview = true 93 enable_ohos_hiview_event = true 94 enable_ohos_hiview_platform = false 95} 96 97declare_args() { 98 enable_tee_ree = false 99 enable_ohos_security_dmverity = false 100} 101 102declare_args() { 103 ohos_build_userspace_only = false 104} 105