代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/build_lite 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2020 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.
import("//build/lite/ndk/ndk.gni")
# gn version >= 1714 required.
assert(gn_version >= 1714, "GN version 1714 required, please upgrade!")
# write version info.
version_info = [
"VERSION=\"$ohos_version\"",
"BUILD_TIME=\"$ohos_build_datetime\"",
]
write_file("$root_build_dir/etc/version-info", version_info)
group("prebuilts") {
public_deps = [ "//third_party/musl:sysroot_lite" ]
}
group("ohos") {
deps = []
if (ohos_build_target == "") {
# Step 1: Read product configuration profile.
product_cfg = read_file("${product_config_path}/config.json", "json")
parts_targets_info = read_file(
"${root_build_dir}/build_configs/parts_info/parts_modules_info.json",
"json")
# Step 2: Loop subsystems configured by product.
foreach(product_configed_subsystem, product_cfg.subsystems) {
subsystem_name = product_configed_subsystem.subsystem
if (build_xts || (!build_xts && subsystem_name != "xts")) {
# Step 3: Read OS subsystems profile.
subsystem_parts_info = {
}
subsystem_parts_info = read_file(
"${root_build_dir}/build_configs/mini_adapter/${subsystem_name}.json",
"json")
# Step 4: Loop components configured by product.
foreach(product_configed_component,
product_configed_subsystem.components) {
# Step 5: Check whether the component configured by product is exist.
component_found = false
foreach(part_name, subsystem_parts_info.parts) {
if (product_configed_component.component == part_name) {
component_found = true
}
}
assert(
component_found,
"Component \"${product_configed_component.component}\" not found" + ", please check your product configuration.")
# Step 6: Loop OS components and check validity of product configuration.
foreach(part_name, subsystem_parts_info.parts) {
kernel_valid = true
# Step 6.1: Skip component which not configured by product.
if (part_name == product_configed_component.component) {
# Step 6.1.1: Loop OS components adapted kernel type.
assert(
kernel_valid,
"Invalid component configed, ${subsystem_name}:${product_configed_component.component} " + "not available for kernel: ${product_cfg.kernel_type}!")
# Step 6.1.2: Add valid component for compiling.
# Skip kernel target for userspace only scenario.
if (!ohos_build_userspace_only ||
(ohos_build_userspace_only && subsystem_name != "kernel" &&
subsystem_name != "vendor")) {
foreach(_p_info, parts_targets_info.parts) {
if (_p_info.part_name ==
product_configed_component.component) {
foreach(component_target, _p_info.module_list) {
if (product_configed_component.component == "liteos_m") {
if (component_target !=
"//kernel/liteos_m:build_kernel_image") {
deps += [ component_target ]
}
} else if (product_configed_component.component ==
"uniproton") {
if (component_target !=
"//kernel/uniproton:build_kernel_image") {
deps += [ component_target ]
}
} else {
deps += [ component_target ]
}
}
}
}
}
}
}
}
}
}
# Skip device target for userspace only scenario.
if (!ohos_build_userspace_only) {
# Step 7: Add device and product target by default.
# liteos_m kernel organise device build targets, but not by default.
if (product_cfg.kernel_type != "liteos_m") {
deps += [ "${device_path}/../" ]
}
}
} else {
deps += string_split(ohos_build_target, "&&")
}
}
group("product") {
deps = []
# build product, skip build single component scenario.
if (ohos_build_target == "") {
deps += [ "${product_path}" ]
}
}
group("ndk") {
# Add native API targets.
deps = []
if (ohos_build_ndk) {
deps += [ "//build/lite/ndk:ndk" ]
}
}
if (ohos_build_type == "debug" && product != "") {
action("gen_testfwk_info") {
outputs = [ "$root_out_dir/gen_testfwk_info.log" ]
script = "//build/lite/testfwk/gen_testfwk_info.py"
archive_dir_name = "test_info"
args = [
"--component-info-file",
rebase_path("${product_path}/config.json"),
"--output-json-fold",
rebase_path("${root_out_dir}/${archive_dir_name}/build_configs/"),
"--output-json-file-name",
"infos_for_testfwk.json",
"--output-module-list-files-fold",
rebase_path("${root_out_dir}/${archive_dir_name}/module_list_files/"),
]
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。