• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/clang/clang.gni")
15import("//build/ohos.gni")
16
17ohos_prebuilt_shared_library("libclang_rt.asan.so") {
18  if (target_cpu == "arm") {
19    source = "${clang_base_path}/lib/clang/$clang_version/lib/arm-linux-ohos/libclang_rt.asan.so"
20  } else if (target_cpu == "arm64") {
21    source = "${clang_base_path}/lib/clang/$clang_version/lib/aarch64-linux-ohos/libclang_rt.asan.so"
22  } else if (target_cpu == "x86_64") {
23    source = "${clang_base_path}/lib/clang/$clang_version/lib/x86_64-linux-ohos/libclang_rt.asan.so"
24  } else {
25    source = ""
26  }
27  install_images = [
28    "system",
29    "ramdisk",
30    "updater",
31  ]
32  part_name = "common"
33}
34
35ohos_prebuilt_etc("asan.options") {
36  source = "asan.options"
37  part_name = "common"
38}
39
40ohos_prebuilt_etc("asan.cfg") {
41  source = "asan.cfg"
42  module_install_dir = "etc/init/"
43  part_name = "common"
44}
45
46ohos_shared_library("asan_helper") {
47  sources = [ "asan_helper.c" ]
48  part_name = "common"
49}
50