1# Copyright (c) 2025 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 14import("//build/config/components/ets_frontend/es2abc_config.gni") 15import("//build/ohos.gni") 16import("//foundation/ability/dmsfwk/dmsfwk.gni") 17 18ohos_static_library("distributedextensionability_napi_fwk") { 19 branch_protector_ret = "pac_ret" 20 21 sanitize = { 22 integer_overflow = true 23 ubsan = true 24 boundary_sanitize = true 25 cfi = true 26 cfi_cross_dso = true 27 debug = false 28 } 29 30 sources = [ "distributed_extension_module.cpp" ] 31 32 external_deps = [ "napi:ace_napi" ] 33 34 part_name = "dmsfwk" 35 subsystem_name = "ability" 36} 37 38es2abc_gen_abc("gen_distributed_extension_ability_abc") { 39 src_js = rebase_path("distributed_extension_ability.js") 40 dst_file = rebase_path(target_out_dir + "/distributed_extension_ability.abc") 41 in_puts = [ "distributed_extension_ability.js" ] 42 out_puts = [ target_out_dir + "/distributed_extension_ability.abc" ] 43 extra_args = [ "--module" ] 44} 45 46gen_js_obj("distributed_extension_ability_js") { 47 input = "distributed_extension_ability.js" 48 output = target_out_dir + "/distributed_extension_ability.o" 49} 50 51gen_js_obj("distributed_extension_ability_abc") { 52 input = 53 get_label_info(":gen_distributed_extension_ability_abc", 54 "target_out_dir") + "/distributed_extension_ability.abc" 55 output = target_out_dir + "/distributed_extension_ability_abc.o" 56 dep = ":gen_distributed_extension_ability_abc" 57} 58 59ohos_shared_library("distributedextensionability") { 60 branch_protector_ret = "pac_ret" 61 62 sanitize = { 63 integer_overflow = true 64 ubsan = true 65 boundary_sanitize = true 66 cfi = true 67 cfi_cross_dso = true 68 debug = false 69 } 70 71 deps = [ 72 ":distributed_extension_ability_abc", 73 ":distributed_extension_ability_js", 74 "${dms_path}/frameworks/js/distributed_extension:distributedextensionability_napi_fwk", 75 ] 76 77 relative_install_dir = "module/application" 78 part_name = "dmsfwk" 79 subsystem_name = "ability" 80} 81