blob: 46d7c948788beb8dbe48539e2e9189445d0a3804 [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,
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 },
72 android: {
73 ldflags: [
74 // Allow jni_compiler_test to find Java_MyClassNatives_bar
75 // within itself using dlopen(NULL, ...).
76 "-Wl,--export-dynamic",
77 "-Wl,-u,Java_MyClassNatives_bar",
78 "-Wl,-u,Java_MyClassNatives_sbar",
79 ],
80 shared_libs: [
81 "libcutils",
82 "libdl",
83 "libz",
84 ],
85 cflags: [
86 // gtest issue
87 "-Wno-used-but-marked-unused",
88 "-Wno-deprecated",
89 "-Wno-missing-noreturn",
90 ],
91 },
92
93 android_arm: {
94 relative_install_path: "art/arm",
95 },
96 android_arm64: {
97 relative_install_path: "art/arm64",
98 },
99 android_mips: {
100 relative_install_path: "art/mips",
101 },
102 android_mips64: {
103 relative_install_path: "art/mips64",
104 },
105 android_x86: {
106 relative_install_path: "art/x86",
107 },
108 android_x86_64: {
109 relative_install_path: "art/x86_64",
110 },
111 },
112}
113
114art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700115 name: "libart-gtest-defaults",
116 host_supported: true,
117 defaults: [
118 "art_defaults",
119 "art_debug_defaults",
120 ],
121 shared_libs: [
122 "libartd",
123 "libartd-compiler",
124 ],
125 static_libs: [
126 "libgtest",
127 ],
128 target: {
129 android32: {
130 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest32/art"],
131 },
132 android64: {
133 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
134 },
135 android: {
136 cflags: [
137 // gtest issue
138 "-Wno-used-but-marked-unused",
139 "-Wno-deprecated",
140 "-Wno-missing-noreturn",
141 ],
142 },
143 linux: {
144 cflags: [
145 // gtest issue
146 "-Wno-used-but-marked-unused",
147 "-Wno-deprecated",
148 "-Wno-missing-noreturn",
149 ],
150 },
151 },
152}
153
154art_cc_library {
155 name: "libart-gtest",
156 host_supported: true,
157 whole_static_libs: [
158 "libart-compiler-gtest",
159 "libart-runtime-gtest",
160 "libgtest",
161 ],
162 shared_libs: [
163 "libartd",
164 "libartd-compiler",
165 ],
166 target: {
167 android: {
168 shared_libs: [
169 "libdl",
170 ],
171 },
172 host: {
173 host_ldlibs: [
174 "-ldl",
175 "-lpthread",
176 ],
177 },
178 },
179}