blob: de40e0df48e7d4d4386f4463b91fc33be0fc3276 [file] [log] [blame]
Eric Holkc4239ac2018-09-05 10:43:31 -07001//
2// Copyright (C) 2018 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
Eric Holkdbc36e22018-09-20 12:03:10 -070017cc_defaults {
18 name: "viewcompiler_defaults",
Eric Holkfaefd4f2018-10-11 16:25:57 -070019 header_libs: [
20 "libbase_headers",
21 ],
Eric Holkdbc36e22018-09-20 12:03:10 -070022 shared_libs: [
Eric Holkfaefd4f2018-10-11 16:25:57 -070023 "libbase",
Eric Holkdbc36e22018-09-20 12:03:10 -070024 "libdexfile",
25 "slicer",
26 ],
27}
28
Eric Holkc4239ac2018-09-05 10:43:31 -070029cc_library_host_static {
30 name: "libviewcompiler",
Eric Holkdbc36e22018-09-20 12:03:10 -070031 defaults: ["viewcompiler_defaults"],
Eric Holkc4239ac2018-09-05 10:43:31 -070032 srcs: [
Eric Holkdbc36e22018-09-20 12:03:10 -070033 "dex_builder.cc",
Eric Holkc4239ac2018-09-05 10:43:31 -070034 "java_lang_builder.cc",
35 "util.cc",
36 ],
Eric Holkc4239ac2018-09-05 10:43:31 -070037}
38
39cc_binary_host {
40 name: "viewcompiler",
Eric Holkdbc36e22018-09-20 12:03:10 -070041 defaults: ["viewcompiler_defaults"],
Eric Holkc4239ac2018-09-05 10:43:31 -070042 srcs: [
43 "main.cc",
44 ],
45 static_libs: [
Eric Holkc4239ac2018-09-05 10:43:31 -070046 "libtinyxml2",
47 "libgflags",
48 "libviewcompiler",
49 ],
50}
51
52cc_test_host {
53 name: "view-compiler-tests",
Eric Holkdbc36e22018-09-20 12:03:10 -070054 defaults: ["viewcompiler_defaults"],
Eric Holkc4239ac2018-09-05 10:43:31 -070055 srcs: [
Eric Holkdbc36e22018-09-20 12:03:10 -070056 "dex_builder_test.cc",
Eric Holkc4239ac2018-09-05 10:43:31 -070057 "util_test.cc",
58 ],
59 static_libs: [
60 "libviewcompiler",
Eric Holkdbc36e22018-09-20 12:03:10 -070061 ],
Eric Holkfaefd4f2018-10-11 16:25:57 -070062 test_suites: ["general-tests"],
Eric Holkc4239ac2018-09-05 10:43:31 -070063}
Eric Holkd683f9f2018-10-26 16:08:09 -070064
65cc_binary_host {
66 name: "dex_testcase_generator",
67 defaults: ["viewcompiler_defaults"],
68 srcs: ["dex_testcase_generator.cc"],
69 static_libs: [
70 "libviewcompiler",
71 ],
72}
73
74genrule {
75 name: "generate_dex_testcases",
76 tools: [":dex_testcase_generator"],
77 cmd: "$(location :dex_testcase_generator) $(genDir)",
78 out: [
79 "simple.dex",
80 "trivial.dex",
81 ],
82}