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("//base/print/print_fwk/print.gni") 15import("//build/config/components/ets_frontend/ets2abc_config.gni") 16import("//build/ohos.gni") 17 18config("print_ani_config") { 19 visibility = [ "*:*" ] 20 include_dirs = [ 21 "include", 22 "${print_utils_path}/include", 23 "${print_path}/frameworks/models/print_models/include", 24 ] 25 26 cflags_cc = [ 27 "-fno-exceptions", 28 "-fdata-sections", 29 "-ffunction-sections", 30 "-fno-asynchronous-unwind-tables", 31 "-fno-unwind-tables", 32 "-flto", 33 "--save-temps", 34 "-Os", 35 ] 36} 37 38ohos_shared_library("print_ani") { 39 configs = [ ":print_ani_config" ] 40 branch_protector_ret = "pac_ret" 41 sanitize = { 42 cfi = true 43 cfi_cross_dso = true 44 boundary_sanitize = true 45 debug = false 46 integer_overflow = true 47 ubsan = true 48 } 49 include_dirs = [ "${print_path}/frameworks/innerkitsimpl/print_impl/include" ] 50 sources = [ 51 "src/print_ani.cpp", 52 "src/print_entry.cpp", 53 ] 54 deps = [ 55 "${print_path}/frameworks/helper/print_helper:print_helper", 56 "${print_path}/frameworks/innerkitsimpl/print_impl:print_client", 57 "${print_path}/frameworks/models/print_models:print_models", 58 ] 59 external_deps = [ 60 "ability_base:base", 61 "ability_base:want", 62 "ability_base:zuri", 63 "ability_runtime:ability_context_native", 64 "ability_runtime:ability_manager", 65 "ability_runtime:abilitykit_native", 66 "ability_runtime:data_ability_helper", 67 "ability_runtime:napi_base_context", 68 "ability_runtime:runtime", 69 "ability_runtime:ui_extension", 70 "access_token:libaccesstoken_sdk", 71 "ace_engine:ace_uicontent", 72 "bundle_framework:appexecfwk_core", 73 "c_utils:utils", 74 "eventhandler:libeventhandler", 75 "hilog:libhilog", 76 "ipc:ipc_core", 77 "napi:ace_napi", 78 "runtime_core:ani", 79 "runtime_core:libarkruntime", 80 "samgr:samgr_proxy", 81 ] 82 subsystem_name = "print" 83 part_name = "print_fwk" 84 output_extension = "so" 85} 86 87ohos_prebuilt_etc("print_abc_etc") { 88 source = "$target_out_dir/print.abc" 89 module_install_dir = "framework" 90 subsystem_name = "print" 91 part_name = "print_fwk" 92 deps = [ ":print" ] 93} 94 95generate_static_abc("print") { 96 base_url = "./ets" 97 files = [ 98 "./ets/@ohos.print.ets" 99 ] 100 is_boot_abc = "True" 101 device_dst_file = "/system/framework/print.abc" 102} 103 104 105group("anipackage") { 106 deps = [ 107 ":print_abc_etc", 108 ":print_ani", 109 ] 110} 111