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 14import("//build/ohos.gni") 15import("//foundation/graphic/graphic_surface/graphic_surface_config.gni") 16 17## Build sync_fence.so {{{ 18config("sync_fence_config") { 19 visibility = [ ":sync_fence" ] 20 21 cflags = [ 22 "-Wall", 23 "-Werror", 24 "-g3", 25 "-Wno-error=missing-braces", 26 "-Wno-error=#warnings", 27 ] 28 defines = rs_common_define 29} 30 31config("sync_fence_public_config") { 32 include_dirs = [ 33 "include", 34 "//foundation/graphic/graphic_surface/interfaces/inner_api/utils", 35 ] 36} 37 38ohos_shared_library("sync_fence") { 39 sanitize = { 40 boundary_sanitize = true 41 integer_overflow = true 42 ubsan = true 43 } 44 45 sources = [ 46 "src/acquire_fence_manager.cpp", 47 "src/frame_sched.cpp", 48 "src/sync_fence.cpp", 49 "src/sync_fence_tracker.cpp", 50 ] 51 52 configs = [ ":sync_fence_config" ] 53 54 public_configs = [ ":sync_fence_public_config" ] 55 56 external_deps = [ 57 "c_utils:utils", 58 "eventhandler:libeventhandler", 59 "hilog:libhilog", 60 "hisysevent:libhisysevent", 61 "hitrace:hitrace_meter", 62 "init:libbegetutil", 63 "ipc:ipc_single", 64 ] 65 66 if (!is_emulator && !build_ohos_sdk && current_os == "ohos") { 67 defines = [ "FENCE_SCHED_ENABLE" ] 68 } 69 70 innerapi_tags = [ 71 "chipsetsdk", 72 "platformsdk_indirect", 73 ] 74 part_name = "graphic_surface" 75 subsystem_name = "graphic" 76} 77## Build sync_fence.so }}} 78