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: { |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 26 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 27 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 28 | "libbase", |
| 29 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 30 | static_libs: [ |
| 31 | // ZipArchive support, the order matters here to get all symbols. |
| 32 | "libziparchive", |
| 33 | "libz", |
| 34 | ], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 35 | export_shared_lib_headers: ["libbase"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 36 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 37 | not_windows: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 38 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 39 | "libartpalette", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 40 | "libziparchive", |
| 41 | "libz", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 42 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 43 | ], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 44 | export_shared_lib_headers: ["libbase"], |
| 45 | }, |
| 46 | windows: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 47 | cflags: ["-Wno-thread-safety"], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 48 | static_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 49 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 50 | "libziparchive", |
| 51 | "libz", |
| 52 | "libbase", |
| 53 | ], |
| 54 | export_static_lib_headers: ["libbase"], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 55 | }, |
David Srbecky | d53f606 | 2019-03-22 14:55:21 +0000 | [diff] [blame] | 56 | darwin: { |
| 57 | enabled: true, |
| 58 | }, |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 59 | }, |
Mathieu Chartier | 818cb80 | 2018-05-11 05:30:16 +0000 | [diff] [blame] | 60 | //generated_sources: ["art_libartbase_operator_srcs"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 61 | cflags: ["-DBUILDING_LIBART=1"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 62 | export_include_dirs: ["."], |
| 63 | // ART's macros.h depends on libbase's macros.h. |
| 64 | // Note: runtime_options.h depends on cmdline. But we don't really want to export this |
| 65 | // generically. dex2oat takes care of it itself. |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 66 | } |
| 67 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 68 | cc_defaults { |
| 69 | name: "libprofile_static_base_defaults", |
| 70 | static_libs: [ |
| 71 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 72 | "libz", |
| 73 | "libziparchive", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 74 | ], |
| 75 | } |
| 76 | |
| 77 | cc_defaults { |
| 78 | name: "libprofile_static_defaults", |
| 79 | defaults: [ |
| 80 | "libprofile_static_base_defaults", |
| 81 | "libartbase_static_defaults", |
| 82 | "libdexfile_static_defaults", |
| 83 | ], |
| 84 | static_libs: ["libprofile"], |
| 85 | } |
| 86 | |
| 87 | cc_defaults { |
| 88 | name: "libprofiled_static_defaults", |
| 89 | defaults: [ |
| 90 | "libprofile_static_base_defaults", |
| 91 | "libartbased_static_defaults", |
| 92 | "libdexfiled_static_defaults", |
| 93 | ], |
| 94 | static_libs: ["libprofiled"], |
| 95 | } |
| 96 | |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 97 | art_cc_library { |
| 98 | name: "libprofile", |
| 99 | defaults: ["libprofile_defaults"], |
| 100 | // Leave the symbols in the shared library so that stack unwinders can |
| 101 | // produce meaningful name resolution. |
| 102 | strip: { |
| 103 | keep_symbols: true, |
| 104 | }, |
| 105 | shared_libs: [ |
| 106 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 107 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 108 | ], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 109 | export_shared_lib_headers: ["libbase"], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 110 | target: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 111 | android: { |
| 112 | shared_libs: [ |
| 113 | "libartbase", |
| 114 | "libdexfile", |
| 115 | ], |
| 116 | }, |
| 117 | not_windows: { |
| 118 | shared_libs: [ |
| 119 | "libartbase", |
| 120 | "libdexfile", |
| 121 | ], |
| 122 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 123 | windows: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 124 | enabled: true, |
| 125 | shared: { |
| 126 | enabled: false, |
| 127 | }, |
| 128 | static_libs: [ |
| 129 | "libartbase", |
| 130 | "libdexfile", |
| 131 | ], |
| 132 | }, |
| 133 | }, |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | art_cc_library { |
| 137 | name: "libprofiled", |
| 138 | defaults: [ |
| 139 | "art_debug_defaults", |
| 140 | "libprofile_defaults", |
| 141 | ], |
| 142 | shared_libs: [ |
| 143 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 144 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 145 | ], |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 146 | target: { |
| 147 | android: { |
| 148 | shared_libs: [ |
| 149 | "libartbased", |
| 150 | "libdexfiled", |
| 151 | ], |
| 152 | }, |
| 153 | not_windows: { |
| 154 | shared_libs: [ |
| 155 | "libartbased", |
| 156 | "libdexfiled", |
| 157 | ], |
| 158 | }, |
| 159 | windows: { |
| 160 | static_libs: [ |
| 161 | "libartbased", |
| 162 | "libdexfiled", |
| 163 | ], |
| 164 | }, |
| 165 | }, |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 166 | export_shared_lib_headers: ["libbase"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 167 | } |
| 168 | |
| 169 | // For now many of these tests still use CommonRuntimeTest, almost universally because of |
| 170 | // ScratchFile and related. |
| 171 | // TODO: Remove CommonRuntimeTest dependency from these tests. |
| 172 | art_cc_test { |
| 173 | name: "art_libprofile_tests", |
| 174 | defaults: [ |
| 175 | "art_gtest_defaults", |
| 176 | ], |
| 177 | srcs: [ |
| 178 | "profile/profile_compilation_info_test.cc", |
| 179 | ], |
| 180 | shared_libs: [ |
| 181 | "libartbased", |
| 182 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 183 | "libartbased", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 184 | "libziparchive", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 185 | ], |
| 186 | } |