blob: 9d0d8ba8b7ea38d448337e42c962c9ac99373a28 [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",
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070017 "dexopt.cpp",
Dan Willemsen4c939742016-12-06 15:44:57 -080018 "globals.cpp",
19 "utils.cpp",
Colin Crossdd2dae92017-11-14 13:05:37 -080020 ":installd_aidl",
Dan Willemsen4c939742016-12-06 15:44:57 -080021 ],
Andreas Gampefa2dadd2018-02-28 19:52:47 -080022 header_libs: [
23 "dex2oat_headers",
24 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080025 shared_libs: [
26 "libbase",
27 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010028 "libcrypto",
Dan Willemsen4c939742016-12-06 15:44:57 -080029 "libcutils",
30 "liblog",
31 "liblogwrap",
32 "libselinux",
33 "libutils",
34 ],
35
36 clang: true,
Jeff Sharkeyc1149c92017-09-21 14:51:09 -060037
38 tidy: true,
39 tidy_checks: [
40 "-*",
41 "clang-analyzer-security*",
42 "cert-*",
43 "-cert-err58-cpp",
44 ],
45 tidy_flags: [
46 "-warnings-as-errors=clang-analyzer-security*,cert-*"
47 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080048}
49
50//
51// Static library used in testing and executable
52//
53
54cc_library_static {
55 name: "libinstalld",
56 defaults: ["installd_defaults"],
57
58 export_include_dirs: ["."],
59 aidl: {
60 export_aidl_headers: true,
61 },
62}
63
64//
65// Executable
66//
67
68cc_binary {
69 name: "installd",
70 defaults: ["installd_defaults"],
71 srcs: ["installd.cpp"],
72
73 static_libs: ["libdiskusage"],
74
75 init_rc: ["installd.rc"],
76}
77
Dan Willemsen2a001e82016-08-05 14:06:41 -070078// OTA chroot tool
79
80cc_binary {
81 name: "otapreopt_chroot",
82 cflags: [
83 "-Wall",
84 "-Werror",
85 ],
86 clang: true,
87
88 srcs: ["otapreopt_chroot.cpp"],
89 shared_libs: [
90 "libbase",
91 "liblog",
92 ],
93}
Dan Willemsen4c939742016-12-06 15:44:57 -080094
Colin Crossdd2dae92017-11-14 13:05:37 -080095filegroup {
96 name: "installd_aidl",
97 srcs: [
98 "binder/android/os/IInstalld.aidl",
99 ],
100}
101
Calin Juravledff47292018-02-01 14:44:56 +0000102//
103// Static library for otapreopt used in testing
104//
105cc_library_static {
106 name: "libotapreoptparameters",
107 cflags: [
108 "-Wall",
109 "-Werror"
110 ],
Calin Juravledff47292018-02-01 14:44:56 +0000111
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700112 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000113
114 export_include_dirs: ["."],
115
116 shared_libs: [
117 "libbase",
118 "libcutils",
119 "liblog",
120 "libutils",
121 ],
122}
123
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700124//
125// OTA Executable
126//
127
128cc_binary {
129 name: "otapreopt",
130 cflags: [
131 "-Wall",
132 "-Werror"
133 ],
134
135 srcs: [
136 "dexopt.cpp",
137 "globals.cpp",
138 "otapreopt.cpp",
139 "utils.cpp",
140 ],
141
142 header_libs: ["dex2oat_headers"],
143
144 static_libs: [
145 "libartimagevalues",
146 "libdiskusage",
147 "libotapreoptparameters",
148 ],
149
150 shared_libs: [
151 "libbase",
152 "libcrypto",
153 "libcutils",
154 "liblog",
155 "liblogwrap",
156 "libselinux",
157 "libutils",
158 ],
159}