blob: 0af974577ed951204612d81e9cd493ef598e9d61 [file] [log] [blame]
Chia-I Wu34dc4dd2017-12-27 13:46:06 -08001// Copyright 2010 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_library_shared {
16 name: "libhwc2on1adapter",
17 vendor: true,
18
19 clang: true,
20 cflags: [
21 "-Wall",
22 "-Werror",
Chia-I Wu34dc4dd2017-12-27 13:46:06 -080023 ],
24 cppflags: [
25 "-Weverything",
26 "-Wunused",
27 "-Wunreachable-code",
28
29 // The static constructors and destructors in this library have not been noted to
30 // introduce significant overheads
31 "-Wno-exit-time-destructors",
32 "-Wno-global-constructors",
33
34 // We only care about compiling as C++14
35 "-Wno-c++98-compat-pedantic",
36
37 // android/sensors.h uses nested anonymous unions and anonymous structs
38 "-Wno-nested-anon-types",
39 "-Wno-gnu-anonymous-struct",
40
41 // Don't warn about struct padding
42 "-Wno-padded",
43
44 // hwcomposer2.h features switch covering all cases.
45 "-Wno-covered-switch-default",
46
47 // hwcomposer.h features zero size array.
48 "-Wno-zero-length-array",
49
50 // Disabling warning specific to hwc2on1adapter code
51 "-Wno-double-promotion",
52 "-Wno-sign-conversion",
53 "-Wno-switch-enum",
54 "-Wno-float-equal",
55 "-Wno-shorten-64-to-32",
56 "-Wno-sign-compare",
57 "-Wno-missing-prototypes",
Yi Kong4321dfe2019-09-20 13:22:49 -070058 "-Wno-format-pedantic",
Chia-I Wu34dc4dd2017-12-27 13:46:06 -080059 ],
60
61 srcs: [
62 "HWC2On1Adapter.cpp",
63 "MiniFence.cpp",
64 ],
65
66 shared_libs: [
67 "libutils",
68 "libcutils",
69 "liblog",
70 "libhardware",
71 ],
72
73 export_include_dirs: ["include"],
74
75 export_shared_lib_headers: ["libutils"],
76}