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/ohos.gni")
15import("//foundation/graphic/graphic_surface/graphic_surface_config.gni")
16
17## buffer_handle.so {{{
18config("buffer_handle_config") {
19  visibility = [ ":buffer_handle" ]
20
21  cflags = [
22    "-Wall",
23    "-Werror",
24    "-g3",
25    "-Wno-error=missing-braces",
26    "-Wno-error=#warnings",
27  ]
28}
29
30config("buffer_handle_public_config") {
31  include_dirs = [ "$graphic_surface_root/interfaces/inner_api/utils" ]
32}
33
34ohos_static_library("buffer_handle") {
35  sanitize = {
36    boundary_sanitize = true
37    integer_overflow = true
38    ubsan = true
39  }
40  sources = [ "src/buffer_handle.cpp" ]
41
42  configs = [ ":buffer_handle_config" ]
43
44  public_configs = [ ":buffer_handle_public_config" ]
45
46  external_deps = [
47    "c_utils:utils",
48    "hilog:libhilog",
49    "ipc:ipc_single",
50  ]
51
52  subsystem_name = "graphic"
53  part_name = "graphic_surface"
54}
55## buffer_handle.so }}}
56