blob: 3c42ede116dfa1ede6b921604494222797527d71 [file] [log] [blame]
Dan Willemsen4c939742016-12-06 15:44:57 -08001cc_defaults {
2 name: "installd_defaults",
3
4 cflags: [
5 "-Wall",
6 "-Werror",
Jeff Sharkeyc1149c92017-09-21 14:51:09 -06007 "-Wextra",
Andreas Gampefa2dadd2018-02-28 19:52:47 -08008
9 "-Wunreachable-code",
10 "-Wunreachable-code-break",
11 "-Wunreachable-code-return",
Dan Willemsen4c939742016-12-06 15:44:57 -080012 ],
13 srcs: [
Jeff Sharkey88ddd942017-01-17 18:05:54 -070014 "CacheItem.cpp",
15 "CacheTracker.cpp",
Jeff Sharkeyf3e30b92016-12-09 17:06:57 -070016 "InstalldNativeService.cpp",
Risan5f308262018-10-26 12:06:58 -060017 "QuotaUtils.cpp",
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070018 "dexopt.cpp",
Dan Willemsen4c939742016-12-06 15:44:57 -080019 "globals.cpp",
20 "utils.cpp",
Colin Crossdd2dae92017-11-14 13:05:37 -080021 ":installd_aidl",
Dan Willemsen4c939742016-12-06 15:44:57 -080022 ],
Andreas Gampefa2dadd2018-02-28 19:52:47 -080023 header_libs: [
24 "dex2oat_headers",
25 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080026 shared_libs: [
27 "libbase",
28 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010029 "libcrypto",
Dan Willemsen4c939742016-12-06 15:44:57 -080030 "libcutils",
31 "liblog",
32 "liblogwrap",
33 "libselinux",
34 "libutils",
35 ],
36
37 clang: true,
Jeff Sharkeyc1149c92017-09-21 14:51:09 -060038
39 tidy: true,
40 tidy_checks: [
41 "-*",
42 "clang-analyzer-security*",
43 "cert-*",
44 "-cert-err58-cpp",
45 ],
46 tidy_flags: [
47 "-warnings-as-errors=clang-analyzer-security*,cert-*"
48 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080049}
50
51//
52// Static library used in testing and executable
53//
54
55cc_library_static {
56 name: "libinstalld",
57 defaults: ["installd_defaults"],
58
59 export_include_dirs: ["."],
60 aidl: {
61 export_aidl_headers: true,
62 },
63}
64
65//
66// Executable
67//
68
69cc_binary {
70 name: "installd",
71 defaults: ["installd_defaults"],
72 srcs: ["installd.cpp"],
73
74 static_libs: ["libdiskusage"],
75
76 init_rc: ["installd.rc"],
77}
78
Dan Willemsen2a001e82016-08-05 14:06:41 -070079// OTA chroot tool
80
81cc_binary {
82 name: "otapreopt_chroot",
83 cflags: [
84 "-Wall",
85 "-Werror",
86 ],
87 clang: true,
88
89 srcs: ["otapreopt_chroot.cpp"],
90 shared_libs: [
91 "libbase",
92 "liblog",
93 ],
94}
Dan Willemsen4c939742016-12-06 15:44:57 -080095
Colin Crossdd2dae92017-11-14 13:05:37 -080096filegroup {
97 name: "installd_aidl",
98 srcs: [
99 "binder/android/os/IInstalld.aidl",
100 ],
101}
102
Calin Juravledff47292018-02-01 14:44:56 +0000103//
104// Static library for otapreopt used in testing
105//
106cc_library_static {
107 name: "libotapreoptparameters",
108 cflags: [
109 "-Wall",
110 "-Werror"
111 ],
Calin Juravledff47292018-02-01 14:44:56 +0000112
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700113 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000114
115 export_include_dirs: ["."],
116
117 shared_libs: [
118 "libbase",
119 "libcutils",
120 "liblog",
121 "libutils",
122 ],
123}
124
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700125//
126// OTA Executable
127//
128
129cc_binary {
130 name: "otapreopt",
131 cflags: [
132 "-Wall",
133 "-Werror"
134 ],
135
136 srcs: [
137 "dexopt.cpp",
138 "globals.cpp",
139 "otapreopt.cpp",
140 "utils.cpp",
141 ],
142
143 header_libs: ["dex2oat_headers"],
144
145 static_libs: [
146 "libartimagevalues",
147 "libdiskusage",
148 "libotapreoptparameters",
149 ],
150
151 shared_libs: [
152 "libbase",
153 "libcrypto",
154 "libcutils",
155 "liblog",
156 "liblogwrap",
157 "libselinux",
158 "libutils",
159 ],
160}