| 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 | |
| 17 | cc_defaults { |
| 18 | name: "hiddenapi-defaults", |
| 19 | host_supported: true, |
| 20 | device_supported: false, |
| 21 | defaults: ["art_defaults"], |
| 22 | srcs: [ |
| 23 | "hiddenapi.cc", |
| 24 | ], |
| 25 | |
| 26 | target: { |
| David Srbecky | d53f606 | 2019-03-22 14:55:21 +0000 | [diff] [blame] | 27 | darwin: { |
| 28 | enabled: true, |
| 29 | }, |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 30 | }, |
| 31 | |
| 32 | shared_libs: [ |
| 33 | "libbase", |
| 34 | ], |
| 35 | } |
| 36 | |
| 37 | art_cc_binary { |
| 38 | name: "hiddenapi", |
| 39 | defaults: ["hiddenapi-defaults"], |
| Martin Stjernholm | c42db83 | 2020-02-25 16:02:07 +0000 | [diff] [blame] | 40 | target: { |
| 41 | host: { |
| 42 | // Override the prefer32 added by art_cc_binary when |
| 43 | // HOST_PREFER_32_BIT is in use. Note that this override cannot be |
| 44 | // in cc_defaults because it'd get overridden by the load hook even |
| 45 | // when it uses PrependProperties. |
| 46 | compile_multilib: "64", |
| 47 | }, |
| 48 | }, |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 49 | shared_libs: [ |
| David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 50 | "libdexfile", |
| David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 51 | "libartbase", |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 52 | ], |
| 53 | } |
| 54 | |
| 55 | art_cc_binary { |
| 56 | name: "hiddenapid", |
| 57 | defaults: [ |
| 58 | "art_debug_defaults", |
| 59 | "hiddenapi-defaults", |
| 60 | ], |
| 61 | shared_libs: [ |
| David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 62 | "libdexfiled", |
| David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 63 | "libartbased", |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 64 | ], |
| 65 | } |
| 66 | |
| 67 | art_cc_test { |
| 68 | name: "art_hiddenapi_tests", |
| David Brazdil | 0baa7cc | 2018-01-17 09:59:08 +0000 | [diff] [blame] | 69 | host_supported: true, |
| 70 | device_supported: false, |
| David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 71 | defaults: [ |
| 72 | "art_gtest_defaults", |
| 73 | ], |
| 74 | srcs: ["hiddenapi_test.cc"], |
| 75 | } |