arkui_ace_engine/build/ace_lib.gni
sunfei a43ef7f213 move ace_coverage_config to root config
Signed-off-by: sunfei <sunfei.sun@huawei.com>
Change-Id: I1afb19814a71d48937de29d72d446d9daeeb35e5
2023-05-30 21:53:15 +08:00

93 lines
3.1 KiB
Plaintext

# Copyright (c) 2021 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/ohos.gni")
import("//foundation/arkui/ace_engine/ace_config.gni")
# Build libace static library
template("libace_static") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
deps = [ "$ace_root/frameworks/base:ace_base_$platform" ]
if (enable_ng_build) {
deps += [
"$ace_root/frameworks/bridge:framework_bridge_ng_$platform",
"$ace_root/frameworks/core:ace_core_ng_$platform",
]
} else {
deps += [
"$ace_root/frameworks/bridge:framework_bridge_$platform",
"$ace_root/frameworks/core:ace_core_$platform",
]
}
if (defined(config.platform_deps)) {
deps += config.platform_deps
}
# build-in ark js engine for preview
if (defined(config.use_build_in_js_engine) &&
config.use_build_in_js_engine && defined(config.ark_engine)) {
if (enable_ng_build) {
deps += [ "$ace_root/frameworks/bridge/declarative_frontend:declarative_js_engine_ng_ark_$platform" ]
} else {
deps += [
"$ace_root/frameworks/bridge/declarative_frontend:declarative_js_engine_ark_$platform",
"$ace_root/frameworks/bridge/js_frontend/engine:js_engine_ark_$platform",
]
}
}
configs = [ "$ace_root:ace_coverage_config" ]
part_name = ace_engine_part
subsystem_name = ace_engine_subsystem
}
}
# build platform engine sources
template("ace_bridge_engine") {
forward_variables_from(invoker, "*")
ohos_shared_library(target_name) {
configs = [ "$ace_root:ace_coverage_config" ]
deps = []
assert(defined(platform) && platform == "ohos",
"Only ohos need separated engine lib")
if (build_type == "engine") {
if (use_js_debug) {
deps += [ "$ace_root/frameworks/bridge/js_frontend/engine:js_engine_${engine_name}_debug_$platform" ]
} else {
deps += [ "$ace_root/frameworks/bridge/js_frontend/engine:js_engine_${engine_name}_$platform" ]
}
} else if (build_type == "engine_declarative") {
deps += [ "$ace_root/frameworks/bridge/declarative_frontend:declarative_js_engine_${engine_name}_$platform" ]
} else if (build_type == "engine_pa") {
deps += [ "$ace_root/${pa_engine_path}/engine:js_pa_engine_${engine_name}_$platform" ]
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
}
}