Files
ability_ability_runtime/frameworks/js/napi/ability/BUILD.gn
T
jiangzhijun8 e3f9623d21 Issue: https://gitee.com/openharmony/ability_ability_runtime/issues/IACWM4
Comment: es2abc_config.gn整改

Signed-off-by: jiangzhijun8 <jiangzhijun7@huawei.com>
2024-07-15 10:00:31 +08:00

66 lines
1.8 KiB
Plaintext

# Copyright (c) 2021-2022 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/config/components/ets_frontend/es2abc_config.gni")
import("//build/ohos.gni")
es2abc_gen_abc("gen_ability_abc") {
src_js = rebase_path("ability.js")
dst_file = rebase_path(target_out_dir + "/ability.abc")
in_puts = [ "ability.js" ]
out_puts = [ target_out_dir + "/ability.abc" ]
extra_args = [ "--module" ]
}
gen_js_obj("ability_js") {
input = "ability.js"
output = target_out_dir + "/ability.o"
}
gen_js_obj("ability_abc") {
input = get_label_info(":gen_ability_abc", "target_out_dir") + "/ability.abc"
output = target_out_dir + "/ability_abc.o"
dep = ":gen_ability_abc"
}
template("ohos_ability_napi") {
ohos_shared_library(target_name) {
forward_variables_from(invoker, [ "relative_install_dir" ])
if (defined(invoker.defines)) {
defines = invoker.defines
}
sources = [ "ability_module.cpp" ]
deps = [
":ability_abc",
":ability_js",
]
external_deps = [ "napi:ace_napi" ]
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_ability_napi("ability_napi") {
relative_install_dir = "module/application"
}
ohos_ability_napi("uiability") {
relative_install_dir = "module/app/ability"
defines = [ "ENABLE_ERRCODE" ]
}