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 { 23 source = "" 24 } 25 install_images = [ 26 "system", 27 "ramdisk", 28 "updater", 29 ] 30 part_name = "common" 31} 32 33ohos_prebuilt_etc("asan.options") { 34 source = "asan.options" 35 part_name = "common" 36} 37 38ohos_prebuilt_etc("asan.cfg") { 39 source = "asan.cfg" 40 module_install_dir = "etc/init/" 41 part_name = "common" 42} 43 44ohos_copy("asan_image_conf") { 45 sources = [ "system_image_conf.txt" ] 46 outputs = [ "${product_output_dir}/imagesconf/{{source_file_part}}" ] 47} 48