blob: d17261cd686c138e6f134dc22126c3b5698e43a3 [file] [log] [blame]
Colin Cross6b22aa52016-09-12 14:35:39 -07001//
2// Copyright (C) 2016 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17art_cc_defaults {
Colin Cross6e95dd52016-09-12 15:37:10 -070018 name: "art_test_defaults",
19 host_supported: true,
Colin Crossafd3c9e2016-09-16 13:47:21 -070020 target: {
21 android_arm: {
22 relative_install_path: "art/arm",
23 },
24 android_arm64: {
25 relative_install_path: "art/arm64",
26 },
27 android_mips: {
28 relative_install_path: "art/mips",
29 },
30 android_mips64: {
31 relative_install_path: "art/mips64",
32 },
33 android_x86: {
34 relative_install_path: "art/x86",
35 },
36 android_x86_64: {
37 relative_install_path: "art/x86_64",
38 },
Colin Crossfd5428b2016-09-19 10:40:05 -070039 darwin: {
40 enabled: false,
41 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070042 },
Dan Albertb5d36de2016-09-21 14:56:51 -070043 cflags: [
44 "-Wno-frame-larger-than=",
45 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -070046}
47
48art_cc_defaults {
49 name: "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070050 test_per_src: true,
51 // These really are gtests, but the gtest library comes from libart-gtest.so
52 gtest: false,
53 defaults: [
54 "art_defaults",
55 "art_debug_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -070056 "art_test_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070057 ],
58
59 shared_libs: [
60 "libartd",
61 "libartd-disassembler",
62 "libvixld-arm",
63 "libvixld-arm64",
64 "libart-gtest",
65
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070066 "libbase",
Colin Cross6e95dd52016-09-12 15:37:10 -070067 "libicuuc",
68 "libicui18n",
69 "libnativehelper",
70 ],
71 whole_static_libs: [
72 "libsigchain",
73 ],
74 include_dirs: [
75 "art",
76 "art/cmdline",
77 ],
78
79 target: {
80 linux: {
81 ldflags: [
82 // Allow jni_compiler_test to find Java_MyClassNatives_bar
83 // within itself using dlopen(NULL, ...).
84 // Mac OS linker doesn't understand --export-dynamic.
85 "-Wl,--export-dynamic",
86 "-Wl,-u,Java_MyClassNatives_bar",
87 "-Wl,-u,Java_MyClassNatives_sbar",
88 ],
89 shared_libs: [
90 "libziparchive",
91 "libz-host",
92 ],
93 host_ldlibs: [
94 "-ldl",
95 "-lpthread",
96 ],
97 cflags: [
98 // gtest issue
99 "-Wno-used-but-marked-unused",
100 "-Wno-deprecated",
101 "-Wno-missing-noreturn",
102 ],
103 },
104 android: {
105 ldflags: [
106 // Allow jni_compiler_test to find Java_MyClassNatives_bar
107 // within itself using dlopen(NULL, ...).
108 "-Wl,--export-dynamic",
109 "-Wl,-u,Java_MyClassNatives_bar",
110 "-Wl,-u,Java_MyClassNatives_sbar",
111 ],
112 shared_libs: [
Dimitry Ivanov9642b1b2016-09-28 02:44:00 -0700113 "liblog",
Colin Cross6e95dd52016-09-12 15:37:10 -0700114 "libdl",
115 "libz",
116 ],
117 cflags: [
118 // gtest issue
119 "-Wno-used-but-marked-unused",
120 "-Wno-deprecated",
121 "-Wno-missing-noreturn",
122 ],
123 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700124 },
125}
126
127art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700128 name: "libart-gtest-defaults",
129 host_supported: true,
130 defaults: [
131 "art_defaults",
132 "art_debug_defaults",
133 ],
134 shared_libs: [
135 "libartd",
136 "libartd-compiler",
137 ],
138 static_libs: [
139 "libgtest",
140 ],
141 target: {
142 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700143 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700144 },
145 android64: {
146 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
147 },
148 android: {
149 cflags: [
150 // gtest issue
151 "-Wno-used-but-marked-unused",
152 "-Wno-deprecated",
153 "-Wno-missing-noreturn",
154 ],
155 },
156 linux: {
157 cflags: [
158 // gtest issue
159 "-Wno-used-but-marked-unused",
160 "-Wno-deprecated",
161 "-Wno-missing-noreturn",
162 ],
163 },
Colin Cross942036f2016-09-15 16:24:51 -0700164 darwin: {
165 enabled: false,
166 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700167 },
168}
169
170art_cc_library {
171 name: "libart-gtest",
172 host_supported: true,
173 whole_static_libs: [
174 "libart-compiler-gtest",
175 "libart-runtime-gtest",
176 "libgtest",
177 ],
178 shared_libs: [
179 "libartd",
180 "libartd-compiler",
181 ],
182 target: {
183 android: {
184 shared_libs: [
185 "libdl",
186 ],
187 },
188 host: {
189 host_ldlibs: [
190 "-ldl",
191 "-lpthread",
192 ],
193 },
Colin Cross942036f2016-09-15 16:24:51 -0700194 darwin: {
195 enabled: false,
196 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700197 },
198}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700199
200cc_defaults {
201 name: "libartagent-defaults",
202 defaults: [
203 "art_defaults",
204 "art_test_defaults",
205 ],
206 shared_libs: [
207 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700208 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700209 "libnativehelper",
210 ],
211 target: {
212 android: {
213 shared_libs: ["libdl"],
214 },
215 host: {
216 host_ldlibs: [
217 "-ldl",
218 "-lpthread",
219 ],
220 },
221 },
222}
223
224art_cc_test_library {
225 name: "libartagent",
226 srcs: ["900-hello-plugin/load_unload.cc"],
227 defaults: ["libartagent-defaults"],
228 shared_libs: ["libart"],
229}
230
231art_cc_test_library {
232 name: "libartagentd",
233 srcs: ["900-hello-plugin/load_unload.cc"],
234 defaults: [
235 "libartagent-defaults",
236 "art_debug_defaults",
237 ],
238 shared_libs: ["libartd"],
239}
240
241art_cc_test_library {
242 name: "libtiagent",
243 defaults: ["libartagent-defaults"],
244 srcs: [
245 "ti-agent/common_load.cc",
246 "901-hello-ti-agent/basics.cc",
Alex Light9c20a142016-08-23 15:05:12 -0700247 "902-hello-transformation/transform.cc",
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700248 "903-hello-tagging/tagging.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700249 ],
250 shared_libs: [
251 "libart",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700252 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700253 "libopenjdkjvmti",
254 ],
255}
256
257art_cc_test_library {
258 name: "libtiagentd",
259 defaults: [
260 "libartagent-defaults",
261 "art_debug_defaults",
262 ],
263 srcs: [
264 "ti-agent/common_load.cc",
265 "901-hello-ti-agent/basics.cc",
Alex Light9c20a142016-08-23 15:05:12 -0700266 "902-hello-transformation/transform.cc",
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700267 "903-hello-tagging/tagging.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700268 ],
269 shared_libs: [
270 "libartd",
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700271 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700272 "libopenjdkjvmtid",
273 ],
274}
275
276cc_defaults {
277 name: "libarttest-defaults",
278 defaults: [
279 "art_defaults",
280 "art_test_defaults",
281 ],
282 srcs: [
283 "common/runtime_state.cc",
284 "common/stack_inspect.cc",
285 "004-JniTest/jni_test.cc",
286 "004-SignalTest/signaltest.cc",
287 "004-ReferenceMap/stack_walk_refmap_jni.cc",
288 "004-StackWalk/stack_walk_jni.cc",
289 "004-ThreadStress/thread_stress.cc",
290 "004-UnsafeTest/unsafe_test.cc",
291 "044-proxy/native_proxy.cc",
292 "051-thread/thread_test.cc",
293 "117-nopatchoat/nopatchoat.cc",
294 "1337-gc-coverage/gc_coverage.cc",
295 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
296 "137-cfi/cfi.cc",
297 "139-register-natives/regnative.cc",
298 "141-class-unload/jni_unload.cc",
299 "148-multithread-gc-annotations/gc_coverage.cc",
300 "149-suspend-all-stress/suspend_all.cc",
301 "454-get-vreg/get_vreg_jni.cc",
302 "457-regs/regs_jni.cc",
303 "461-get-reference-vreg/get_reference_vreg_jni.cc",
304 "466-get-live-vreg/get_live_vreg_jni.cc",
305 "497-inlining-and-class-loader/clear_dex_cache.cc",
306 "543-env-long-ref/env_long_ref.cc",
307 "566-polymorphic-inlining/polymorphic_inline.cc",
308 "570-checker-osr/osr.cc",
309 "595-profile-saving/profile-saving.cc",
310 "596-app-images/app_images.cc",
311 "597-deopt-new-string/deopt.cc",
312 ],
313 shared_libs: [
314 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700315 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700316 "libnativehelper",
317 ],
318 target: {
319 android: {
320 shared_libs: ["libdl"],
321 },
322 host: {
323 host_ldlibs: [
324 "-ldl",
325 "-lpthread",
326 ],
327 },
328 },
329}
330
331art_cc_test_library {
332 name: "libarttest",
333 defaults: ["libarttest-defaults"],
334 shared_libs: ["libart"],
335}
336
337art_cc_test_library {
338 name: "libarttestd",
339 defaults: [
340 "libarttest-defaults",
341 "art_debug_defaults",
342 ],
343 shared_libs: ["libartd"],
344}
345
346art_cc_test_library {
347 name: "libnativebridgetest",
348 shared_libs: ["libart"],
349 defaults: [
350 "art_defaults",
351 "art_debug_defaults",
352 "art_test_defaults",
353 ],
354 srcs: ["115-native-bridge/nativebridge.cc"],
355 target: {
356 android: {
357 shared_libs: ["libdl"],
358 },
359 host: {
360 host_ldlibs: [
361 "-ldl",
362 "-lpthread",
363 ],
364 },
365 linux: {
366 host_ldlibs: ["-lrt"],
367 },
368 },
369}