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: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 26 | static_libs: [ |
| 27 | // ZipArchive support, the order matters here to get all symbols. |
| 28 | "libziparchive", |
| 29 | "libz", |
| 30 | ], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 31 | }, |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 32 | host: { |
| 33 | shared_libs: [ |
| 34 | "libziparchive", |
| 35 | "libz", |
| 36 | ], |
| 37 | }, |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 38 | }, |
Mathieu Chartier | 818cb80 | 2018-05-11 05:30:16 +0000 | [diff] [blame] | 39 | //generated_sources: ["art_libartbase_operator_srcs"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 40 | cflags: ["-DBUILDING_LIBART=1"], |
| 41 | shared_libs: [ |
| 42 | "libartbase", |
| 43 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 44 | "libartbase", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 45 | // For atrace. |
| 46 | "libcutils", |
| 47 | ], |
| 48 | export_include_dirs: ["."], |
| 49 | // ART's macros.h depends on libbase's macros.h. |
| 50 | // Note: runtime_options.h depends on cmdline. But we don't really want to export this |
| 51 | // generically. dex2oat takes care of it itself. |
| 52 | export_shared_lib_headers: ["libbase"], |
| 53 | } |
| 54 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 55 | cc_defaults { |
| 56 | name: "libprofile_static_base_defaults", |
| 57 | static_libs: [ |
| 58 | "libbase", |
| 59 | "libcutils", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 60 | "libz", |
| 61 | "libziparchive", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 62 | ], |
| 63 | } |
| 64 | |
| 65 | cc_defaults { |
| 66 | name: "libprofile_static_defaults", |
| 67 | defaults: [ |
| 68 | "libprofile_static_base_defaults", |
| 69 | "libartbase_static_defaults", |
| 70 | "libdexfile_static_defaults", |
| 71 | ], |
| 72 | static_libs: ["libprofile"], |
| 73 | } |
| 74 | |
| 75 | cc_defaults { |
| 76 | name: "libprofiled_static_defaults", |
| 77 | defaults: [ |
| 78 | "libprofile_static_base_defaults", |
| 79 | "libartbased_static_defaults", |
| 80 | "libdexfiled_static_defaults", |
| 81 | ], |
| 82 | static_libs: ["libprofiled"], |
| 83 | } |
| 84 | |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 85 | art_cc_library { |
| 86 | name: "libprofile", |
| 87 | defaults: ["libprofile_defaults"], |
| 88 | // Leave the symbols in the shared library so that stack unwinders can |
| 89 | // produce meaningful name resolution. |
| 90 | strip: { |
| 91 | keep_symbols: true, |
| 92 | }, |
| 93 | shared_libs: [ |
| 94 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 95 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 96 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 97 | export_shared_lib_headers: ["libbase"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | art_cc_library { |
| 101 | name: "libprofiled", |
| 102 | defaults: [ |
| 103 | "art_debug_defaults", |
| 104 | "libprofile_defaults", |
| 105 | ], |
| 106 | shared_libs: [ |
| 107 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 108 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 109 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 110 | export_shared_lib_headers: ["libbase"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | // For now many of these tests still use CommonRuntimeTest, almost universally because of |
| 114 | // ScratchFile and related. |
| 115 | // TODO: Remove CommonRuntimeTest dependency from these tests. |
| 116 | art_cc_test { |
| 117 | name: "art_libprofile_tests", |
| 118 | defaults: [ |
| 119 | "art_gtest_defaults", |
| 120 | ], |
| 121 | srcs: [ |
| 122 | "profile/profile_compilation_info_test.cc", |
| 123 | ], |
| 124 | shared_libs: [ |
| 125 | "libartbased", |
| 126 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 127 | "libartbased", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 128 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 129 | ], |
| 130 | } |