blob: 2d61000711858111decac6a5575b09bcbd90e698 [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
66 "libicuuc",
67 "libicui18n",
68 "libnativehelper",
69 ],
70 whole_static_libs: [
71 "libsigchain",
72 ],
73 include_dirs: [
74 "art",
75 "art/cmdline",
76 ],
77
78 target: {
79 linux: {
80 ldflags: [
81 // Allow jni_compiler_test to find Java_MyClassNatives_bar
82 // within itself using dlopen(NULL, ...).
83 // Mac OS linker doesn't understand --export-dynamic.
84 "-Wl,--export-dynamic",
85 "-Wl,-u,Java_MyClassNatives_bar",
86 "-Wl,-u,Java_MyClassNatives_sbar",
87 ],
88 shared_libs: [
89 "libziparchive",
90 "libz-host",
91 ],
92 host_ldlibs: [
93 "-ldl",
94 "-lpthread",
95 ],
96 cflags: [
97 // gtest issue
98 "-Wno-used-but-marked-unused",
99 "-Wno-deprecated",
100 "-Wno-missing-noreturn",
101 ],
102 },
103 android: {
104 ldflags: [
105 // Allow jni_compiler_test to find Java_MyClassNatives_bar
106 // within itself using dlopen(NULL, ...).
107 "-Wl,--export-dynamic",
108 "-Wl,-u,Java_MyClassNatives_bar",
109 "-Wl,-u,Java_MyClassNatives_sbar",
110 ],
111 shared_libs: [
112 "libcutils",
113 "libdl",
114 "libz",
115 ],
116 cflags: [
117 // gtest issue
118 "-Wno-used-but-marked-unused",
119 "-Wno-deprecated",
120 "-Wno-missing-noreturn",
121 ],
122 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700123 },
124}
125
126art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700127 name: "libart-gtest-defaults",
128 host_supported: true,
129 defaults: [
130 "art_defaults",
131 "art_debug_defaults",
132 ],
133 shared_libs: [
134 "libartd",
135 "libartd-compiler",
136 ],
137 static_libs: [
138 "libgtest",
139 ],
140 target: {
141 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700142 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700143 },
144 android64: {
145 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
146 },
147 android: {
148 cflags: [
149 // gtest issue
150 "-Wno-used-but-marked-unused",
151 "-Wno-deprecated",
152 "-Wno-missing-noreturn",
153 ],
154 },
155 linux: {
156 cflags: [
157 // gtest issue
158 "-Wno-used-but-marked-unused",
159 "-Wno-deprecated",
160 "-Wno-missing-noreturn",
161 ],
162 },
Colin Cross942036f2016-09-15 16:24:51 -0700163 darwin: {
164 enabled: false,
165 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700166 },
167}
168
169art_cc_library {
170 name: "libart-gtest",
171 host_supported: true,
172 whole_static_libs: [
173 "libart-compiler-gtest",
174 "libart-runtime-gtest",
175 "libgtest",
176 ],
177 shared_libs: [
178 "libartd",
179 "libartd-compiler",
180 ],
181 target: {
182 android: {
183 shared_libs: [
184 "libdl",
185 ],
186 },
187 host: {
188 host_ldlibs: [
189 "-ldl",
190 "-lpthread",
191 ],
192 },
Colin Cross942036f2016-09-15 16:24:51 -0700193 darwin: {
194 enabled: false,
195 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700196 },
197}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700198
199cc_defaults {
200 name: "libartagent-defaults",
201 defaults: [
202 "art_defaults",
203 "art_test_defaults",
204 ],
205 shared_libs: [
206 "libbacktrace",
207 "libnativehelper",
208 ],
209 target: {
210 android: {
211 shared_libs: ["libdl"],
212 },
213 host: {
214 host_ldlibs: [
215 "-ldl",
216 "-lpthread",
217 ],
218 },
219 },
220}
221
222art_cc_test_library {
223 name: "libartagent",
224 srcs: ["900-hello-plugin/load_unload.cc"],
225 defaults: ["libartagent-defaults"],
226 shared_libs: ["libart"],
227}
228
229art_cc_test_library {
230 name: "libartagentd",
231 srcs: ["900-hello-plugin/load_unload.cc"],
232 defaults: [
233 "libartagent-defaults",
234 "art_debug_defaults",
235 ],
236 shared_libs: ["libartd"],
237}
238
239art_cc_test_library {
240 name: "libtiagent",
241 defaults: ["libartagent-defaults"],
242 srcs: [
243 "ti-agent/common_load.cc",
244 "901-hello-ti-agent/basics.cc",
Alex Light9c20a142016-08-23 15:05:12 -0700245 "902-hello-transformation/transform.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700246 ],
247 shared_libs: [
248 "libart",
249 "libopenjdkjvmti",
250 ],
251}
252
253art_cc_test_library {
254 name: "libtiagentd",
255 defaults: [
256 "libartagent-defaults",
257 "art_debug_defaults",
258 ],
259 srcs: [
260 "ti-agent/common_load.cc",
261 "901-hello-ti-agent/basics.cc",
Alex Light9c20a142016-08-23 15:05:12 -0700262 "902-hello-transformation/transform.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700263 ],
264 shared_libs: [
265 "libartd",
266 "libopenjdkjvmtid",
267 ],
268}
269
270cc_defaults {
271 name: "libarttest-defaults",
272 defaults: [
273 "art_defaults",
274 "art_test_defaults",
275 ],
276 srcs: [
277 "common/runtime_state.cc",
278 "common/stack_inspect.cc",
279 "004-JniTest/jni_test.cc",
280 "004-SignalTest/signaltest.cc",
281 "004-ReferenceMap/stack_walk_refmap_jni.cc",
282 "004-StackWalk/stack_walk_jni.cc",
283 "004-ThreadStress/thread_stress.cc",
284 "004-UnsafeTest/unsafe_test.cc",
285 "044-proxy/native_proxy.cc",
286 "051-thread/thread_test.cc",
287 "117-nopatchoat/nopatchoat.cc",
288 "1337-gc-coverage/gc_coverage.cc",
289 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
290 "137-cfi/cfi.cc",
291 "139-register-natives/regnative.cc",
292 "141-class-unload/jni_unload.cc",
293 "148-multithread-gc-annotations/gc_coverage.cc",
294 "149-suspend-all-stress/suspend_all.cc",
295 "454-get-vreg/get_vreg_jni.cc",
296 "457-regs/regs_jni.cc",
297 "461-get-reference-vreg/get_reference_vreg_jni.cc",
298 "466-get-live-vreg/get_live_vreg_jni.cc",
299 "497-inlining-and-class-loader/clear_dex_cache.cc",
300 "543-env-long-ref/env_long_ref.cc",
301 "566-polymorphic-inlining/polymorphic_inline.cc",
302 "570-checker-osr/osr.cc",
303 "595-profile-saving/profile-saving.cc",
304 "596-app-images/app_images.cc",
305 "597-deopt-new-string/deopt.cc",
306 ],
307 shared_libs: [
308 "libbacktrace",
309 "libnativehelper",
310 ],
311 target: {
312 android: {
313 shared_libs: ["libdl"],
314 },
315 host: {
316 host_ldlibs: [
317 "-ldl",
318 "-lpthread",
319 ],
320 },
321 },
322}
323
324art_cc_test_library {
325 name: "libarttest",
326 defaults: ["libarttest-defaults"],
327 shared_libs: ["libart"],
328}
329
330art_cc_test_library {
331 name: "libarttestd",
332 defaults: [
333 "libarttest-defaults",
334 "art_debug_defaults",
335 ],
336 shared_libs: ["libartd"],
337}
338
339art_cc_test_library {
340 name: "libnativebridgetest",
341 shared_libs: ["libart"],
342 defaults: [
343 "art_defaults",
344 "art_debug_defaults",
345 "art_test_defaults",
346 ],
347 srcs: ["115-native-bridge/nativebridge.cc"],
348 target: {
349 android: {
350 shared_libs: ["libdl"],
351 },
352 host: {
353 host_ldlibs: [
354 "-ldl",
355 "-lpthread",
356 ],
357 },
358 linux: {
359 host_ldlibs: ["-lrt"],
360 },
361 },
362}