Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 1 | // |
| 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 | |
| 17 | art_cc_defaults { |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 18 | name: "art_test_defaults", |
| 19 | host_supported: true, |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 20 | 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 Cross | fd5428b | 2016-09-19 10:40:05 -0700 | [diff] [blame] | 39 | darwin: { |
| 40 | enabled: false, |
| 41 | }, |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 42 | }, |
Dan Albert | b5d36de | 2016-09-21 14:56:51 -0700 | [diff] [blame] | 43 | cflags: [ |
| 44 | "-Wno-frame-larger-than=", |
| 45 | ], |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | art_cc_defaults { |
| 49 | name: "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 50 | 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 Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 56 | "art_test_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 57 | ], |
| 58 | |
| 59 | shared_libs: [ |
| 60 | "libartd", |
| 61 | "libartd-disassembler", |
| 62 | "libvixld-arm", |
| 63 | "libvixld-arm64", |
| 64 | "libart-gtest", |
| 65 | |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 66 | "libbase", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 67 | "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 Ivanov | 9642b1b | 2016-09-28 02:44:00 -0700 | [diff] [blame] | 113 | "liblog", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 114 | "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 Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 124 | }, |
| 125 | } |
| 126 | |
| 127 | art_cc_defaults { |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 128 | 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 Cross | c5c7187 | 2016-09-15 21:07:29 -0700 | [diff] [blame] | 143 | cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"], |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 144 | }, |
| 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 Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 164 | darwin: { |
| 165 | enabled: false, |
| 166 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 167 | }, |
| 168 | } |
| 169 | |
| 170 | art_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", |
Colin Cross | f0af906 | 2016-10-21 10:50:31 -0700 | [diff] [blame] | 181 | "libbase", |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 182 | ], |
| 183 | target: { |
| 184 | android: { |
| 185 | shared_libs: [ |
| 186 | "libdl", |
| 187 | ], |
| 188 | }, |
| 189 | host: { |
| 190 | host_ldlibs: [ |
| 191 | "-ldl", |
| 192 | "-lpthread", |
| 193 | ], |
| 194 | }, |
Colin Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 195 | darwin: { |
| 196 | enabled: false, |
| 197 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 198 | }, |
| 199 | } |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 200 | |
| 201 | cc_defaults { |
| 202 | name: "libartagent-defaults", |
| 203 | defaults: [ |
| 204 | "art_defaults", |
| 205 | "art_test_defaults", |
| 206 | ], |
| 207 | shared_libs: [ |
| 208 | "libbacktrace", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 209 | "libbase", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 210 | "libnativehelper", |
| 211 | ], |
| 212 | target: { |
| 213 | android: { |
| 214 | shared_libs: ["libdl"], |
| 215 | }, |
| 216 | host: { |
| 217 | host_ldlibs: [ |
| 218 | "-ldl", |
| 219 | "-lpthread", |
| 220 | ], |
| 221 | }, |
| 222 | }, |
| 223 | } |
| 224 | |
| 225 | art_cc_test_library { |
| 226 | name: "libartagent", |
| 227 | srcs: ["900-hello-plugin/load_unload.cc"], |
| 228 | defaults: ["libartagent-defaults"], |
| 229 | shared_libs: ["libart"], |
| 230 | } |
| 231 | |
| 232 | art_cc_test_library { |
| 233 | name: "libartagentd", |
| 234 | srcs: ["900-hello-plugin/load_unload.cc"], |
| 235 | defaults: [ |
| 236 | "libartagent-defaults", |
| 237 | "art_debug_defaults", |
| 238 | ], |
| 239 | shared_libs: ["libartd"], |
| 240 | } |
| 241 | |
Andreas Gampe | e54d992 | 2016-10-11 19:55:37 -0700 | [diff] [blame] | 242 | art_cc_defaults { |
| 243 | name: "libtiagent-defaults", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 244 | defaults: ["libartagent-defaults"], |
| 245 | srcs: [ |
| 246 | "ti-agent/common_load.cc", |
| 247 | "901-hello-ti-agent/basics.cc", |
Alex Light | 9c20a14 | 2016-08-23 15:05:12 -0700 | [diff] [blame] | 248 | "902-hello-transformation/transform.cc", |
Andreas Gampe | 6dee92e | 2016-09-12 19:58:13 -0700 | [diff] [blame] | 249 | "903-hello-tagging/tagging.cc", |
Andreas Gampe | 27fa96c | 2016-10-07 15:05:24 -0700 | [diff] [blame] | 250 | "904-object-allocation/tracking.cc", |
Andreas Gampe | cc13b22 | 2016-10-10 19:09:09 -0700 | [diff] [blame] | 251 | "905-object-free/tracking_free.cc", |
Andreas Gampe | e54d992 | 2016-10-11 19:55:37 -0700 | [diff] [blame] | 252 | "906-iterate-heap/iterate_heap.cc", |
Andreas Gampe | aa8b60c | 2016-10-12 12:51:25 -0700 | [diff] [blame] | 253 | "907-get-loaded-classes/get_loaded_classes.cc", |
Andreas Gampe | 9b8c588 | 2016-10-21 15:27:46 -0700 | [diff] [blame] | 254 | "908-gc-start-finish/gc_callbacks.cc", |
Leonard Mosescu | eb84221 | 2016-10-06 17:26:36 -0700 | [diff] [blame] | 255 | "909-attach-agent/attach.cc", |
Andreas Gampe | 3c252f0 | 2016-10-27 18:25:17 -0700 | [diff] [blame^] | 256 | "910-methods/methods.cc", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 257 | ], |
| 258 | shared_libs: [ |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 259 | "libbase", |
Andreas Gampe | e54d992 | 2016-10-11 19:55:37 -0700 | [diff] [blame] | 260 | ], |
| 261 | } |
| 262 | |
| 263 | art_cc_test_library { |
| 264 | name: "libtiagent", |
| 265 | defaults: ["libtiagent-defaults"], |
| 266 | shared_libs: [ |
| 267 | "libart", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 268 | "libopenjdkjvmti", |
| 269 | ], |
| 270 | } |
| 271 | |
| 272 | art_cc_test_library { |
| 273 | name: "libtiagentd", |
| 274 | defaults: [ |
Andreas Gampe | e54d992 | 2016-10-11 19:55:37 -0700 | [diff] [blame] | 275 | "libtiagent-defaults", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 276 | "art_debug_defaults", |
| 277 | ], |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 278 | shared_libs: [ |
| 279 | "libartd", |
| 280 | "libopenjdkjvmtid", |
| 281 | ], |
| 282 | } |
| 283 | |
| 284 | cc_defaults { |
| 285 | name: "libarttest-defaults", |
| 286 | defaults: [ |
| 287 | "art_defaults", |
| 288 | "art_test_defaults", |
| 289 | ], |
| 290 | srcs: [ |
| 291 | "common/runtime_state.cc", |
| 292 | "common/stack_inspect.cc", |
| 293 | "004-JniTest/jni_test.cc", |
| 294 | "004-SignalTest/signaltest.cc", |
| 295 | "004-ReferenceMap/stack_walk_refmap_jni.cc", |
| 296 | "004-StackWalk/stack_walk_jni.cc", |
| 297 | "004-ThreadStress/thread_stress.cc", |
| 298 | "004-UnsafeTest/unsafe_test.cc", |
| 299 | "044-proxy/native_proxy.cc", |
| 300 | "051-thread/thread_test.cc", |
| 301 | "117-nopatchoat/nopatchoat.cc", |
| 302 | "1337-gc-coverage/gc_coverage.cc", |
| 303 | "136-daemon-jni-shutdown/daemon_jni_shutdown.cc", |
| 304 | "137-cfi/cfi.cc", |
| 305 | "139-register-natives/regnative.cc", |
| 306 | "141-class-unload/jni_unload.cc", |
| 307 | "148-multithread-gc-annotations/gc_coverage.cc", |
| 308 | "149-suspend-all-stress/suspend_all.cc", |
| 309 | "454-get-vreg/get_vreg_jni.cc", |
| 310 | "457-regs/regs_jni.cc", |
| 311 | "461-get-reference-vreg/get_reference_vreg_jni.cc", |
| 312 | "466-get-live-vreg/get_live_vreg_jni.cc", |
| 313 | "497-inlining-and-class-loader/clear_dex_cache.cc", |
| 314 | "543-env-long-ref/env_long_ref.cc", |
| 315 | "566-polymorphic-inlining/polymorphic_inline.cc", |
| 316 | "570-checker-osr/osr.cc", |
| 317 | "595-profile-saving/profile-saving.cc", |
| 318 | "596-app-images/app_images.cc", |
| 319 | "597-deopt-new-string/deopt.cc", |
| 320 | ], |
| 321 | shared_libs: [ |
| 322 | "libbacktrace", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 323 | "libbase", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 324 | "libnativehelper", |
| 325 | ], |
| 326 | target: { |
| 327 | android: { |
| 328 | shared_libs: ["libdl"], |
| 329 | }, |
| 330 | host: { |
| 331 | host_ldlibs: [ |
| 332 | "-ldl", |
| 333 | "-lpthread", |
| 334 | ], |
| 335 | }, |
| 336 | }, |
| 337 | } |
| 338 | |
| 339 | art_cc_test_library { |
| 340 | name: "libarttest", |
| 341 | defaults: ["libarttest-defaults"], |
| 342 | shared_libs: ["libart"], |
| 343 | } |
| 344 | |
| 345 | art_cc_test_library { |
| 346 | name: "libarttestd", |
| 347 | defaults: [ |
| 348 | "libarttest-defaults", |
| 349 | "art_debug_defaults", |
| 350 | ], |
| 351 | shared_libs: ["libartd"], |
| 352 | } |
| 353 | |
| 354 | art_cc_test_library { |
| 355 | name: "libnativebridgetest", |
| 356 | shared_libs: ["libart"], |
| 357 | defaults: [ |
| 358 | "art_defaults", |
| 359 | "art_debug_defaults", |
| 360 | "art_test_defaults", |
| 361 | ], |
| 362 | srcs: ["115-native-bridge/nativebridge.cc"], |
| 363 | target: { |
| 364 | android: { |
| 365 | shared_libs: ["libdl"], |
| 366 | }, |
| 367 | host: { |
| 368 | host_ldlibs: [ |
| 369 | "-ldl", |
| 370 | "-lpthread", |
| 371 | ], |
| 372 | }, |
| 373 | linux: { |
| 374 | host_ldlibs: ["-lrt"], |
| 375 | }, |
| 376 | }, |
| 377 | } |