1885b47fbSopenharmony_ci# Copyright (C) 2022 Huawei Device Co., Ltd.
2885b47fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3885b47fbSopenharmony_ci# you may not use this file except in compliance with the License.
4885b47fbSopenharmony_ci# You may obtain a copy of the License at
5885b47fbSopenharmony_ci#
6885b47fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7885b47fbSopenharmony_ci#
8885b47fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9885b47fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10885b47fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11885b47fbSopenharmony_ci# See the License for the specific language governing permissions and
12885b47fbSopenharmony_ci# limitations under the License.
13885b47fbSopenharmony_ci
14885b47fbSopenharmony_ciimport("//build/ohos.gni")
15885b47fbSopenharmony_ciimport(
16885b47fbSopenharmony_ci    "../../../../../../../arkcompiler/ets_frontend/es2panda/es2abc_config.gni")
17885b47fbSopenharmony_ci
18885b47fbSopenharmony_cies2abc_gen_abc("gen_accessibility_extension_abc") {
19885b47fbSopenharmony_ci  src_js = rebase_path("accessibility_extension.js")
20885b47fbSopenharmony_ci  dst_file = rebase_path(target_out_dir + "/accessibility_extension.abc")
21885b47fbSopenharmony_ci  in_puts = [ "accessibility_extension.js" ]
22885b47fbSopenharmony_ci  out_puts = [ target_out_dir + "/accessibility_extension.abc" ]
23885b47fbSopenharmony_ci  extra_args = [ "--module" ]
24885b47fbSopenharmony_ci}
25885b47fbSopenharmony_ci
26885b47fbSopenharmony_cigen_js_obj("accessibility_extension_js") {
27885b47fbSopenharmony_ci  input = "accessibility_extension.js"
28885b47fbSopenharmony_ci  output = target_out_dir + "/accessibility_extension.o"
29885b47fbSopenharmony_ci}
30885b47fbSopenharmony_ci
31885b47fbSopenharmony_cigen_js_obj("accessibility_extension_abc") {
32885b47fbSopenharmony_ci  input = get_label_info(":gen_accessibility_extension_abc", "target_out_dir") +
33885b47fbSopenharmony_ci          "/accessibility_extension.abc"
34885b47fbSopenharmony_ci  output = target_out_dir + "/accessibility_extension_abc.o"
35885b47fbSopenharmony_ci  dep = ":gen_accessibility_extension_abc"
36885b47fbSopenharmony_ci}
37885b47fbSopenharmony_ci
38885b47fbSopenharmony_ciohos_shared_library("accessibilityextensionability_napi") {
39885b47fbSopenharmony_ci  branch_protector_ret = "pac_ret"
40885b47fbSopenharmony_ci  sanitize = {
41885b47fbSopenharmony_ci    integer_overflow = true
42885b47fbSopenharmony_ci    ubsan = true
43885b47fbSopenharmony_ci    boundary_sanitize = true
44885b47fbSopenharmony_ci    cfi = false
45885b47fbSopenharmony_ci    cfi_cross_dso = false
46885b47fbSopenharmony_ci    debug = false
47885b47fbSopenharmony_ci  }
48885b47fbSopenharmony_ci
49885b47fbSopenharmony_ci  sources = [ "accessibility_extension_module.cpp" ]
50885b47fbSopenharmony_ci
51885b47fbSopenharmony_ci  deps = [
52885b47fbSopenharmony_ci    ":accessibility_extension_abc",
53885b47fbSopenharmony_ci    ":accessibility_extension_js",
54885b47fbSopenharmony_ci  ]
55885b47fbSopenharmony_ci
56885b47fbSopenharmony_ci  external_deps = [ "napi:ace_napi" ]
57885b47fbSopenharmony_ci
58885b47fbSopenharmony_ci  relative_install_dir = "module/application"
59885b47fbSopenharmony_ci  subsystem_name = "barrierfree"
60885b47fbSopenharmony_ci  part_name = "accessibility"
61885b47fbSopenharmony_ci}
62