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/ohos/config.gni") 15import("//build/config/sanitizers/sanitizers.gni") 16import("//build/ohos.gni") 17 18group("common_packages") { 19 deps = [ "//third_party/sqlite:sqlite" ] 20 21 deps += [ "musl:musl_install" ] 22 23 deps += [ 24 "asan:asan.options", 25 "asan:libclang_rt.asan.so", 26 ] 27 28 if (target_cpu == "arm64") { 29 deps += [ 30 "asan:libclang_rt.hwasan.so", 31 "asan:libclang_rt.tsan.so", 32 "asan:tsan.options", 33 ] 34 } 35 36 if (is_asan) { 37 deps += [ 38 "asan:asan.cfg", 39 "asan:asan_helper", 40 ] 41 } else if (is_tsan) { 42 deps += [ 43 "asan:asan.cfg", 44 "asan:asan_helper", 45 "asan:libclang_rt.tsan.so", 46 ] 47 } else { 48 # ubsan.cfg defines the log_path, different with asan.cfg 49 deps += [ 50 "ubsan:libclang_rt.ubsan_minimal.so", 51 "ubsan:libclang_rt.ubsan_standalone.so", 52 "ubsan:ubsan.cfg", 53 ] 54 } 55} 56