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, |
| 20 | test_per_src: true, |
| 21 | // These really are gtests, but the gtest library comes from libart-gtest.so |
| 22 | gtest: false, |
| 23 | defaults: [ |
| 24 | "art_defaults", |
| 25 | "art_debug_defaults", |
| 26 | ], |
| 27 | |
| 28 | shared_libs: [ |
| 29 | "libartd", |
| 30 | "libartd-disassembler", |
| 31 | "libvixld-arm", |
| 32 | "libvixld-arm64", |
| 33 | "libart-gtest", |
| 34 | |
| 35 | "libicuuc", |
| 36 | "libicui18n", |
| 37 | "libnativehelper", |
| 38 | ], |
| 39 | whole_static_libs: [ |
| 40 | "libsigchain", |
| 41 | ], |
| 42 | include_dirs: [ |
| 43 | "art", |
| 44 | "art/cmdline", |
| 45 | ], |
| 46 | |
| 47 | target: { |
| 48 | linux: { |
| 49 | ldflags: [ |
| 50 | // Allow jni_compiler_test to find Java_MyClassNatives_bar |
| 51 | // within itself using dlopen(NULL, ...). |
| 52 | // Mac OS linker doesn't understand --export-dynamic. |
| 53 | "-Wl,--export-dynamic", |
| 54 | "-Wl,-u,Java_MyClassNatives_bar", |
| 55 | "-Wl,-u,Java_MyClassNatives_sbar", |
| 56 | ], |
| 57 | shared_libs: [ |
| 58 | "libziparchive", |
| 59 | "libz-host", |
| 60 | ], |
| 61 | host_ldlibs: [ |
| 62 | "-ldl", |
| 63 | "-lpthread", |
| 64 | ], |
| 65 | cflags: [ |
| 66 | // gtest issue |
| 67 | "-Wno-used-but-marked-unused", |
| 68 | "-Wno-deprecated", |
| 69 | "-Wno-missing-noreturn", |
| 70 | ], |
| 71 | }, |
Colin Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 72 | darwin: { |
| 73 | enabled: false, |
| 74 | }, |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 75 | android: { |
| 76 | ldflags: [ |
| 77 | // Allow jni_compiler_test to find Java_MyClassNatives_bar |
| 78 | // within itself using dlopen(NULL, ...). |
| 79 | "-Wl,--export-dynamic", |
| 80 | "-Wl,-u,Java_MyClassNatives_bar", |
| 81 | "-Wl,-u,Java_MyClassNatives_sbar", |
| 82 | ], |
| 83 | shared_libs: [ |
| 84 | "libcutils", |
| 85 | "libdl", |
| 86 | "libz", |
| 87 | ], |
| 88 | cflags: [ |
| 89 | // gtest issue |
| 90 | "-Wno-used-but-marked-unused", |
| 91 | "-Wno-deprecated", |
| 92 | "-Wno-missing-noreturn", |
| 93 | ], |
| 94 | }, |
| 95 | |
| 96 | android_arm: { |
| 97 | relative_install_path: "art/arm", |
| 98 | }, |
| 99 | android_arm64: { |
| 100 | relative_install_path: "art/arm64", |
| 101 | }, |
| 102 | android_mips: { |
| 103 | relative_install_path: "art/mips", |
| 104 | }, |
| 105 | android_mips64: { |
| 106 | relative_install_path: "art/mips64", |
| 107 | }, |
| 108 | android_x86: { |
| 109 | relative_install_path: "art/x86", |
| 110 | }, |
| 111 | android_x86_64: { |
| 112 | relative_install_path: "art/x86_64", |
| 113 | }, |
| 114 | }, |
| 115 | } |
| 116 | |
| 117 | art_cc_defaults { |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 118 | name: "libart-gtest-defaults", |
| 119 | host_supported: true, |
| 120 | defaults: [ |
| 121 | "art_defaults", |
| 122 | "art_debug_defaults", |
| 123 | ], |
| 124 | shared_libs: [ |
| 125 | "libartd", |
| 126 | "libartd-compiler", |
| 127 | ], |
| 128 | static_libs: [ |
| 129 | "libgtest", |
| 130 | ], |
| 131 | target: { |
| 132 | android32: { |
Colin Cross | c5c7187 | 2016-09-15 21:07:29 -0700 | [diff] [blame] | 133 | cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"], |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 134 | }, |
| 135 | android64: { |
| 136 | cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"], |
| 137 | }, |
| 138 | android: { |
| 139 | cflags: [ |
| 140 | // gtest issue |
| 141 | "-Wno-used-but-marked-unused", |
| 142 | "-Wno-deprecated", |
| 143 | "-Wno-missing-noreturn", |
| 144 | ], |
| 145 | }, |
| 146 | linux: { |
| 147 | cflags: [ |
| 148 | // gtest issue |
| 149 | "-Wno-used-but-marked-unused", |
| 150 | "-Wno-deprecated", |
| 151 | "-Wno-missing-noreturn", |
| 152 | ], |
| 153 | }, |
Colin Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 154 | darwin: { |
| 155 | enabled: false, |
| 156 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 157 | }, |
| 158 | } |
| 159 | |
| 160 | art_cc_library { |
| 161 | name: "libart-gtest", |
| 162 | host_supported: true, |
| 163 | whole_static_libs: [ |
| 164 | "libart-compiler-gtest", |
| 165 | "libart-runtime-gtest", |
| 166 | "libgtest", |
| 167 | ], |
| 168 | shared_libs: [ |
| 169 | "libartd", |
| 170 | "libartd-compiler", |
| 171 | ], |
| 172 | target: { |
| 173 | android: { |
| 174 | shared_libs: [ |
| 175 | "libdl", |
| 176 | ], |
| 177 | }, |
| 178 | host: { |
| 179 | host_ldlibs: [ |
| 180 | "-ldl", |
| 181 | "-lpthread", |
| 182 | ], |
| 183 | }, |
Colin Cross | 942036f | 2016-09-15 16:24:51 -0700 | [diff] [blame] | 184 | darwin: { |
| 185 | enabled: false, |
| 186 | }, |
Colin Cross | 6b22aa5 | 2016-09-12 14:35:39 -0700 | [diff] [blame] | 187 | }, |
| 188 | } |