blob: 4cd81607c301aec8fd7cb11cf0b39a6b18a079ec [file] [log] [blame]
David Brazdil2b9c35b2018-01-12 15:44:43 +00001//
2// Copyright (C) 2017 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
Bob Badour9150de62021-02-26 03:22:24 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "art_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["art_license"],
24}
25
David Brazdil2b9c35b2018-01-12 15:44:43 +000026cc_defaults {
27 name: "hiddenapi-defaults",
28 host_supported: true,
29 device_supported: false,
30 defaults: ["art_defaults"],
31 srcs: [
32 "hiddenapi.cc",
33 ],
34
35 target: {
David Srbeckyd53f6062019-03-22 14:55:21 +000036 darwin: {
37 enabled: true,
38 },
David Brazdil2b9c35b2018-01-12 15:44:43 +000039 },
40
Martin Stjernholm1938b352020-09-23 01:43:41 +010041 stl: "c++_static",
42 static_libs: [
David Brazdil2b9c35b2018-01-12 15:44:43 +000043 "libbase",
44 ],
45}
46
47art_cc_binary {
48 name: "hiddenapi",
Martin Stjernholm1938b352020-09-23 01:43:41 +010049 defaults: [
50 "hiddenapi-defaults",
51 "libartbase_static_defaults",
52 "libdexfile_static_defaults",
53 ],
Martin Stjernholmc42db832020-02-25 16:02:07 +000054 target: {
55 host: {
56 // Override the prefer32 added by art_cc_binary when
57 // HOST_PREFER_32_BIT is in use. Note that this override cannot be
58 // in cc_defaults because it'd get overridden by the load hook even
59 // when it uses PrependProperties.
60 compile_multilib: "64",
61 },
62 },
David Brazdil2b9c35b2018-01-12 15:44:43 +000063}
64
65art_cc_binary {
66 name: "hiddenapid",
67 defaults: [
68 "art_debug_defaults",
69 "hiddenapi-defaults",
Martin Stjernholm1938b352020-09-23 01:43:41 +010070 "libartbased_static_defaults",
71 "libdexfiled_static_defaults",
David Brazdil2b9c35b2018-01-12 15:44:43 +000072 ],
73}
74
75art_cc_test {
76 name: "art_hiddenapi_tests",
David Brazdil0baa7cc2018-01-17 09:59:08 +000077 host_supported: true,
78 device_supported: false,
David Brazdil2b9c35b2018-01-12 15:44:43 +000079 defaults: [
80 "art_gtest_defaults",
81 ],
David Srbecky4a88a5a2020-05-05 16:21:57 +010082 data: [
83 ":art-gtest-jars-HiddenApi",
84 ":art-gtest-jars-HiddenApiStubs",
85 ],
David Brazdil2b9c35b2018-01-12 15:44:43 +000086 srcs: ["hiddenapi_test.cc"],
David Srbecky2280b532020-05-27 00:30:44 +010087 required: ["hiddenapid"],
David Brazdil2b9c35b2018-01-12 15:44:43 +000088}