Artur Satayev | bb44bdc | 2021-03-01 23:47:10 +0000 | [diff] [blame^] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | cc_defaults { |
| 16 | name: "derive_classpath-defaults", |
| 17 | min_sdk_version: "30", |
| 18 | shared_libs: ["liblog"], |
| 19 | // static c++/libbase for smaller size |
| 20 | stl: "c++_static", |
| 21 | static_libs: [ |
| 22 | "libbase", |
| 23 | "libmodules-utils-build", |
| 24 | "libprotobuf-cpp-lite", |
| 25 | ], |
| 26 | } |
| 27 | |
| 28 | cc_library { |
| 29 | name: "libderive_classpath", |
| 30 | srcs: ["derive_classpath.cpp"], |
| 31 | defaults: ["derive_classpath-defaults"], |
| 32 | apex_available: ["com.android.sdkext"], |
| 33 | } |
| 34 | |
| 35 | cc_defaults { |
| 36 | name: "derive_classpath_binary-defaults", |
| 37 | defaults: ["derive_classpath-defaults"], |
| 38 | srcs: ["main.cpp"], |
| 39 | static_libs: ["libderive_classpath"], |
| 40 | } |
| 41 | |
| 42 | cc_binary { |
| 43 | name: "derive_classpath", |
| 44 | defaults: ["derive_classpath_binary-defaults"], |
| 45 | apex_available: ["com.android.sdkext"], |
| 46 | } |
| 47 | |
| 48 | // Work around testing using a 64-bit test suite on 32-bit test device by |
| 49 | // using a prefer32 version of derive_sdk in testing. |
| 50 | cc_binary { |
| 51 | name: "derive_classpath_prefer32", |
| 52 | defaults: ["derive_classpath_binary-defaults"], |
| 53 | compile_multilib: "prefer32", |
| 54 | stem: "derive_classpath", |
| 55 | apex_available: ["test_com.android.sdkext"], |
| 56 | installable: false, |
| 57 | } |
| 58 | |
| 59 | prebuilt_etc { |
| 60 | name: "derive_classpath.rc", |
| 61 | src: "derive_classpath.rc", |
| 62 | installable: false, |
| 63 | } |