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 = "4" 19 minor = "0" 20 revision = "Beta1" 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_path = "" 44 ohos_kernel_is_prebuilt = false 45 use_board_toolchain = true 46 47 # hb set it to true if ccache installed. 48 ohos_build_enable_ccache = false 49 ohos_build_enable_xcache = false 50 51 # Current toolchain cc command. E.g. "/data/user1/riscv32/bin/riscv32-unknown-elf-gcc". 52 ohos_current_cc_command = "" 53 ohos_current_cxx_command = "" 54 ohos_current_ar_command = "" 55 ohos_current_ld_command = "" 56 ohos_current_strip_command = "" 57 58 # Current sysroot path. E.g. "//out/hispark_taurus/ipcamera_hispark_taurus/sysroot". 59 ohos_current_sysroot = "$root_out_dir/sysroot" 60} 61 62if (product_config_path != "") { 63 product_config = read_file("${product_config_path}/config.json", "json") 64 65 # Board selected by product. 66 board_name = product_config.board 67 device_company = product_config.device_company 68 69 # Supported kernel: "liteos_a", "liteos_m", "linux", "uniproton" 70 ohos_kernel_type = product_config.kernel_type 71 if (defined(product_config.kernel_is_prebuilt)) { 72 ohos_kernel_is_prebuilt = product_config.kernel_is_prebuilt 73 } 74 75 # support config kernel liteos_m path 76 if (ohos_kernel_type == "liteos_m") { 77 if (defined(product_config.kernel_path)) { 78 ohos_kernel_path = product_config.kernel_path 79 } else { 80 ohos_kernel_path = "//kernel/liteos_m" 81 } 82 } 83 84 # To be deleted, and will use board config. 85 if (defined(product_config.vendor_adapter_dir)) { 86 ohos_vendor_adapter_dir = product_config.vendor_adapter_dir 87 ohos_board_adapter_dir = ohos_vendor_adapter_dir 88 } 89 ohos_product_adapter_dir = product_config.product_adapter_dir 90 ohos_third_party_dir = product_config.third_party_dir 91} 92 93ohos_build_user = "jenkins" 94ohos_build_host = host_os 95ohos_build_roothash = "" 96ohos_root_path = rebase_path("//") 97ohos_lite = true 98 99# Testing switches 100LOSCFG_TEST_JS_BUILD = false 101LOSCFG_TEST_MLF_BUILD = false 102LOSCFG_TEST_C_BUILD = false 103LOSCFG_TEST_APPS = false 104 105declare_args() { 106 enable_ohos_hiview = true 107 enable_ohos_hiview_event = true 108 enable_ohos_hiview_platform = false 109} 110 111declare_args() { 112 enable_tee_ree = false 113 enable_ohos_security_dmverity = false 114} 115 116declare_args() { 117 ohos_build_userspace_only = false 118} 119