David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 1 | // |
| 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 | |
| 17 | cc_defaults { |
| 18 | name: "libprofile_defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
| 21 | srcs: [ |
| 22 | "profile/profile_compilation_info.cc", |
| 23 | ], |
| 24 | target: { |
| 25 | android: { |
| 26 | static_libs: [ |
| 27 | // ZipArchive support, the order matters here to get all symbols. |
| 28 | "libziparchive", |
| 29 | "libz", |
| 30 | ], |
| 31 | shared_libs: [ |
| 32 | // For android::FileMap used by libziparchive. |
| 33 | "libutils", |
| 34 | ], |
| 35 | }, |
| 36 | host: { |
| 37 | shared_libs: [ |
| 38 | "libziparchive", |
| 39 | "libz", |
| 40 | ], |
| 41 | }, |
| 42 | }, |
Mathieu Chartier | 818cb80 | 2018-05-11 05:30:16 +0000 | [diff] [blame] | 43 | //generated_sources: ["art_libartbase_operator_srcs"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 44 | cflags: ["-DBUILDING_LIBART=1"], |
| 45 | shared_libs: [ |
| 46 | "libartbase", |
| 47 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 48 | "libartbase", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 49 | // For atrace. |
| 50 | "libcutils", |
| 51 | ], |
| 52 | export_include_dirs: ["."], |
| 53 | // ART's macros.h depends on libbase's macros.h. |
| 54 | // Note: runtime_options.h depends on cmdline. But we don't really want to export this |
| 55 | // generically. dex2oat takes care of it itself. |
| 56 | export_shared_lib_headers: ["libbase"], |
| 57 | } |
| 58 | |
| 59 | art_cc_library { |
| 60 | name: "libprofile", |
| 61 | defaults: ["libprofile_defaults"], |
| 62 | // Leave the symbols in the shared library so that stack unwinders can |
| 63 | // produce meaningful name resolution. |
| 64 | strip: { |
| 65 | keep_symbols: true, |
| 66 | }, |
| 67 | shared_libs: [ |
| 68 | "libbase", |
| 69 | "libziparchive", |
| 70 | ], |
| 71 | export_shared_lib_headers: ["libbase"], |
| 72 | } |
| 73 | |
| 74 | art_cc_library { |
| 75 | name: "libprofiled", |
| 76 | defaults: [ |
| 77 | "art_debug_defaults", |
| 78 | "libprofile_defaults", |
| 79 | ], |
| 80 | shared_libs: [ |
| 81 | "libbase", |
| 82 | "libziparchive", |
| 83 | ], |
| 84 | export_shared_lib_headers: ["libbase"], |
| 85 | } |
| 86 | |
| 87 | // For now many of these tests still use CommonRuntimeTest, almost universally because of |
| 88 | // ScratchFile and related. |
| 89 | // TODO: Remove CommonRuntimeTest dependency from these tests. |
| 90 | art_cc_test { |
| 91 | name: "art_libprofile_tests", |
| 92 | defaults: [ |
| 93 | "art_gtest_defaults", |
| 94 | ], |
| 95 | srcs: [ |
| 96 | "profile/profile_compilation_info_test.cc", |
| 97 | ], |
| 98 | shared_libs: [ |
| 99 | "libartbased", |
| 100 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 101 | "libartbased", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 102 | "libziparchive", |
| 103 | ], |
| 104 | } |