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 | |
| 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 Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 123 | }, |
| 124 | } |
| 125 | |
| 126 | art_cc_defaults { |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 127 | 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 Cross | c5c7187 | 2016-09-15 21:07:29 -0700 | [diff] [blame] | 142 | cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"], |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 143 | }, |
| 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 Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 163 | darwin: { |
| 164 | enabled: false, |
| 165 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 166 | }, |
| 167 | } |
| 168 | |
| 169 | art_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 Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 193 | darwin: { |
| 194 | enabled: false, |
| 195 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 196 | }, |
| 197 | } |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 198 | |
| 199 | cc_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 | |
| 222 | art_cc_test_library { |
| 223 | name: "libartagent", |
| 224 | srcs: ["900-hello-plugin/load_unload.cc"], |
| 225 | defaults: ["libartagent-defaults"], |
| 226 | shared_libs: ["libart"], |
| 227 | } |
| 228 | |
| 229 | art_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 | |
| 239 | art_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 Light | 9c20a14 | 2016-08-23 15:05:12 -0700 | [diff] [blame] | 245 | "902-hello-transformation/transform.cc", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 246 | ], |
| 247 | shared_libs: [ |
| 248 | "libart", |
| 249 | "libopenjdkjvmti", |
| 250 | ], |
| 251 | } |
| 252 | |
| 253 | art_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 Light | 9c20a14 | 2016-08-23 15:05:12 -0700 | [diff] [blame] | 262 | "902-hello-transformation/transform.cc", |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 263 | ], |
| 264 | shared_libs: [ |
| 265 | "libartd", |
| 266 | "libopenjdkjvmtid", |
| 267 | ], |
| 268 | } |
| 269 | |
| 270 | cc_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 | |
| 324 | art_cc_test_library { |
| 325 | name: "libarttest", |
| 326 | defaults: ["libarttest-defaults"], |
| 327 | shared_libs: ["libart"], |
| 328 | } |
| 329 | |
| 330 | art_cc_test_library { |
| 331 | name: "libarttestd", |
| 332 | defaults: [ |
| 333 | "libarttest-defaults", |
| 334 | "art_debug_defaults", |
| 335 | ], |
| 336 | shared_libs: ["libartd"], |
| 337 | } |
| 338 | |
| 339 | art_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 | } |