• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
15import("//build/ohos.gni")
16
17# ohos_group("mindir_test") {
18#   deps = [
19#     "tests:mindir_test",
20#   ]
21# }
22
23config("mindir_config") {
24  include_dirs = [ "include" ]
25}
26
27config("mindir_secure_disable_android") {
28  cflags = [
29    "-UANDROID",
30    "-U__ANDROID__",
31    "-U__ANDROID_API__",
32    "-fstack-protector-all",
33    "-D_FORTIFY_SOURCE=2",
34  ]
35  cflags_cc = [
36    "-UANDROID",
37    "-U__ANDROID__",
38    "-U__ANDROID_API__",
39  ]
40  ldflags = [ "-Wl,--no-as-needed" ]
41}
42
43ohos_shared_library("mindir_lib") {
44  branch_protector_ret = "pac_ret"
45  include_dirs = [
46    "../",
47    "../../core",
48    "inner_headers",
49    "../../../../../../../third_party/flatbuffers/include",
50    "../../../../../../../third_party/bounds_checking_function/include",
51    "../../../../../../../base/hiviewdfx/hilog/interfaces/native/innerkits/include",
52  ]
53  sources = [
54    "src/log.cc",
55    "src/mindir.cc",
56    "src/mindir_1.cc",
57    "src/mindir_2.cc",
58    "src/mindir_memory_manager.cc",
59    "src/mindir_nnrt_lite_graph.cc",
60    "src/mindir_tensor.cc",
61    "src/utils.cc",
62  ]
63  external_deps = [
64    "bounds_checking_function:libsec_shared",
65    "c_utils:utils",
66    "drivers_interface_nnrt:libnnrt_proxy_1.0",
67    "drivers_interface_nnrt:libnnrt_proxy_2.0",
68    "drivers_interface_nnrt:nnrt_idl_headers",
69    "hdf_core:libhdi",
70    "hilog:libhilog",
71  ]
72  public_external_deps = [ "flatbuffers:libflatbuffers_static" ]
73  configs = [ ":mindir_secure_disable_android" ]
74  public_configs = [ ":mindir_config" ]
75  defines = [ "MS_COMPILE_OHOS" ]
76  output_name = "mindir"
77  innerapi_tags = [ "platformsdk_indirect" ]
78  part_name = "mindspore"
79  subsystem_name = "thirdparty"
80}
81