# Copyright (C) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") BT_PART_DIR = "../../.." BT_CJ_DIR = "$BT_PART_DIR/frameworks/cj/connection" BT_NAPI_DIR = "$BT_PART_DIR/frameworks/js/napi" ohos_shared_library("cj_bluetooth_connection_ffi") { sanitize = { cfi = true # Enable/disable control flow integrity detection boundary_sanitize = true # Enable boundary san detection cfi_cross_dso = true # Cross-SO CFI Checks integer_overflow = true # Enable integer overflow detection ubsan = true # Enable some Ubsan options debug = false } include_dirs = [ "$BT_CJ_DIR/include", "$BT_CJ_DIR/src", "$BT_NAPI_DIR/include", "$BT_PART_DIR/frameworks/inner/include", ] sources = [ "src/bluetooth_connection_callback.cpp", "src/bluetooth_connection_common.cpp", "src/bluetooth_connection_ffi.cpp", "src/bluetooth_connection_impl.cpp", ] deps = [ "$BT_PART_DIR/frameworks/inner:btframework" ] external_deps = [ "c_utils:utils", "hicollie:libhicollie", "hilog:libhilog", "napi:ace_napi", "napi:cj_bind_ffi", "napi:cj_bind_native", ] innerapi_tags = [ "platformsdk" ] subsystem_name = "communication" part_name = "bluetooth" }