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 14if (is_ohos) { 15 import("//build/config/ohos/config.gni") 16 import("//build/ohos.gni") 17 group("ubsan") { 18 deps = [ 19 ":libclang_rt.ubsan_minimal.so", 20 ":libclang_rt.ubsan_standalone.so", 21 ":ubsan.cfg", 22 ] 23 } 24 25 ohos_prebuilt_etc("ubsan.cfg") { 26 source = "ubsan.cfg" 27 module_install_dir = "etc/init/" 28 part_name = "common" 29 } 30 31 ohos_prebuilt_shared_library("libclang_rt.ubsan_standalone.so") { 32 enable_strip = true 33 source = 34 "${clang_lib_base_path}/${abi_target}/libclang_rt.ubsan_standalone.so" 35 install_images = [ 36 "system", 37 "updater", 38 ] 39 part_name = "common" 40 } 41 42 ohos_prebuilt_shared_library("libclang_rt.ubsan_minimal.so") { 43 enable_strip = true 44 source = "${clang_lib_base_path}/${abi_target}/libclang_rt.ubsan_minimal.so" 45 install_images = [ 46 "system", 47 "updater", 48 ] 49 part_name = "common" 50 } 51} 52