| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 1 | // |
| 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 Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 17 | package { |
| 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 Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 26 | cc_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 Srbecky | d53f606 | 2019-03-22 14:55:21 +0000 | [diff] [blame] | 36 | darwin: { |
| 37 | enabled: true, |
| 38 | }, |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 39 | }, |
| 40 | |
| Martin Stjernholm | 1938b35 | 2020-09-23 01:43:41 +0100 | [diff] [blame] | 41 | stl: "c++_static", |
| 42 | static_libs: [ |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 43 | "libbase", |
| 44 | ], |
| 45 | } |
| 46 | |
| 47 | art_cc_binary { |
| 48 | name: "hiddenapi", |
| Martin Stjernholm | 1938b35 | 2020-09-23 01:43:41 +0100 | [diff] [blame] | 49 | defaults: [ |
| 50 | "hiddenapi-defaults", |
| 51 | "libartbase_static_defaults", |
| 52 | "libdexfile_static_defaults", |
| 53 | ], |
| Martin Stjernholm | c42db83 | 2020-02-25 16:02:07 +0000 | [diff] [blame] | 54 | 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 Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | art_cc_binary { |
| 66 | name: "hiddenapid", |
| 67 | defaults: [ |
| 68 | "art_debug_defaults", |
| 69 | "hiddenapi-defaults", |
| Martin Stjernholm | 1938b35 | 2020-09-23 01:43:41 +0100 | [diff] [blame] | 70 | "libartbased_static_defaults", |
| 71 | "libdexfiled_static_defaults", |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 72 | ], |
| 73 | } |
| 74 | |
| 75 | art_cc_test { |
| 76 | name: "art_hiddenapi_tests", |
| David Brazdil | 0baa7cc | 2018-01-17 09:59:08 +0000 | [diff] [blame] | 77 | host_supported: true, |
| 78 | device_supported: false, |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 79 | defaults: [ |
| 80 | "art_gtest_defaults", |
| 81 | ], |
| David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 82 | data: [ |
| 83 | ":art-gtest-jars-HiddenApi", |
| 84 | ":art-gtest-jars-HiddenApiStubs", |
| 85 | ], |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 86 | srcs: ["hiddenapi_test.cc"], |
| David Srbecky | 2280b53 | 2020-05-27 00:30:44 +0100 | [diff] [blame] | 87 | required: ["hiddenapid"], |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 88 | } |