1# Copyright (C) 2022 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/ohos.gni")
15import(
16    "../../../../../../../arkcompiler/ets_frontend/es2panda/es2abc_config.gni")
17
18es2abc_gen_abc("gen_accessibility_extension_abc") {
19  src_js = rebase_path("accessibility_extension.js")
20  dst_file = rebase_path(target_out_dir + "/accessibility_extension.abc")
21  in_puts = [ "accessibility_extension.js" ]
22  out_puts = [ target_out_dir + "/accessibility_extension.abc" ]
23  extra_args = [ "--module" ]
24}
25
26gen_js_obj("accessibility_extension_js") {
27  input = "accessibility_extension.js"
28  output = target_out_dir + "/accessibility_extension.o"
29}
30
31gen_js_obj("accessibility_extension_abc") {
32  input = get_label_info(":gen_accessibility_extension_abc", "target_out_dir") +
33          "/accessibility_extension.abc"
34  output = target_out_dir + "/accessibility_extension_abc.o"
35  dep = ":gen_accessibility_extension_abc"
36}
37
38ohos_shared_library("accessibilityextensionability_napi") {
39  branch_protector_ret = "pac_ret"
40  sanitize = {
41    integer_overflow = true
42    ubsan = true
43    boundary_sanitize = true
44    cfi = false
45    cfi_cross_dso = false
46    debug = false
47  }
48
49  sources = [ "accessibility_extension_module.cpp" ]
50
51  deps = [
52    ":accessibility_extension_abc",
53    ":accessibility_extension_js",
54  ]
55
56  external_deps = [ "napi:ace_napi" ]
57
58  relative_install_dir = "module/application"
59  subsystem_name = "barrierfree"
60  part_name = "accessibility"
61}
62