Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2008-2014 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 | |
Mark Salyzyn | 93101be | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 17 | liblog_sources = [ |
Tom Cherry | 71ba164 | 2019-01-10 10:37:36 -0800 | [diff] [blame] | 18 | "log_event_list.cpp", |
| 19 | "log_event_write.cpp", |
Tom Cherry | 71ba164 | 2019-01-10 10:37:36 -0800 | [diff] [blame] | 20 | "logger_name.cpp", |
| 21 | "logger_read.cpp", |
| 22 | "logger_write.cpp", |
| 23 | "logprint.cpp", |
Mark Salyzyn | 93101be | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 24 | ] |
| 25 | liblog_host_sources = [ |
Tom Cherry | 71ba164 | 2019-01-10 10:37:36 -0800 | [diff] [blame] | 26 | "fake_log_device.cpp", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 27 | ] |
| 28 | liblog_target_sources = [ |
Mark Salyzyn | ed9dc8a | 2016-11-21 12:00:03 -0800 | [diff] [blame] | 29 | "event_tag_map.cpp", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 30 | "log_time.cpp", |
Tom Cherry | 71ba164 | 2019-01-10 10:37:36 -0800 | [diff] [blame] | 31 | "properties.cpp", |
| 32 | "pmsg_reader.cpp", |
| 33 | "pmsg_writer.cpp", |
| 34 | "logd_reader.cpp", |
| 35 | "logd_writer.cpp", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 36 | ] |
| 37 | |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 38 | cc_library_headers { |
| 39 | name: "liblog_headers", |
| 40 | host_supported: true, |
| 41 | vendor_available: true, |
Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 42 | recovery_available: true, |
dimitry | a808b11 | 2019-05-06 14:01:58 +0200 | [diff] [blame] | 43 | native_bridge_supported: true, |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 44 | export_include_dirs: ["include"], |
Elliott Hughes | 3c3bdc1 | 2019-02-13 12:42:06 -0800 | [diff] [blame] | 45 | system_shared_libs: [], |
| 46 | stl: "none", |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 47 | target: { |
| 48 | windows: { |
| 49 | enabled: true, |
| 50 | }, |
| 51 | linux_bionic: { |
| 52 | enabled: true, |
| 53 | }, |
| 54 | vendor: { |
Steven Moreland | e1c834d | 2018-01-05 14:42:12 -0800 | [diff] [blame] | 55 | override_export_include_dirs: ["include_vndk"], |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 56 | }, |
| 57 | }, |
| 58 | } |
| 59 | |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 60 | // Shared and static library for host and device |
| 61 | // ======================================================== |
| 62 | cc_library { |
| 63 | name: "liblog", |
| 64 | host_supported: true, |
Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 65 | recovery_available: true, |
dimitry | a808b11 | 2019-05-06 14:01:58 +0200 | [diff] [blame] | 66 | native_bridge_supported: true, |
Mark Salyzyn | 93101be | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 67 | srcs: liblog_sources, |
| 68 | |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 69 | target: { |
| 70 | host: { |
| 71 | srcs: liblog_host_sources, |
| 72 | cflags: ["-DFAKE_LOG_DEVICE=1"], |
| 73 | }, |
| 74 | android: { |
Tom Cherry | 44f0023 | 2019-01-17 11:38:31 -0800 | [diff] [blame] | 75 | version_script: "liblog.map.txt", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 76 | srcs: liblog_target_sources, |
| 77 | // AddressSanitizer runtime library depends on liblog. |
Colin Cross | 5d35ce6 | 2016-04-07 13:30:22 -0700 | [diff] [blame] | 78 | sanitize: { |
Evgenii Stepanov | ffdabdc | 2016-11-29 15:02:30 -0800 | [diff] [blame] | 79 | address: false, |
Colin Cross | 5d35ce6 | 2016-04-07 13:30:22 -0700 | [diff] [blame] | 80 | }, |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 81 | }, |
Ian Pedowitz | 7bb9785 | 2018-01-18 16:25:24 -0800 | [diff] [blame] | 82 | android_arm: { |
| 83 | // TODO: This is to work around b/24465209. Remove after root cause is fixed |
Chih-Hung Hsieh | 462df10 | 2018-05-23 18:55:10 -0700 | [diff] [blame] | 84 | pack_relocations: false, |
Ian Pedowitz | 7bb9785 | 2018-01-18 16:25:24 -0800 | [diff] [blame] | 85 | ldflags: ["-Wl,--hash-style=both"], |
| 86 | }, |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 87 | windows: { |
Dan Willemsen | a3f41bf | 2015-11-30 15:35:09 -0800 | [diff] [blame] | 88 | enabled: true, |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 89 | }, |
| 90 | not_windows: { |
Mark Salyzyn | ed9dc8a | 2016-11-21 12:00:03 -0800 | [diff] [blame] | 91 | srcs: ["event_tag_map.cpp"], |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 92 | }, |
Dan Willemsen | 0910d2d | 2016-11-29 13:39:55 -0800 | [diff] [blame] | 93 | linux_bionic: { |
| 94 | enabled: true, |
| 95 | }, |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 96 | }, |
| 97 | |
Tom Cherry | ee747e7 | 2019-12-20 16:06:34 -0800 | [diff] [blame] | 98 | header_libs: [ |
| 99 | "libbase_headers", |
| 100 | "liblog_headers", |
| 101 | ], |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 102 | export_header_lib_headers: ["liblog_headers"], |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 103 | |
Tom Cherry | fe1f701 | 2019-02-08 11:55:36 -0800 | [diff] [blame] | 104 | stubs: { |
| 105 | symbol_file: "liblog.map.txt", |
| 106 | versions: ["10000"], |
| 107 | }, |
| 108 | |
Tom Cherry | 896fb9e | 2019-10-24 10:51:05 -0700 | [diff] [blame] | 109 | // TODO(tomcherry): Renable this before release branch is cut |
| 110 | header_abi_checker: { |
| 111 | enabled: false, |
| 112 | }, |
| 113 | |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 114 | cflags: [ |
Tom Cherry | 7d045f6 | 2019-09-30 12:58:55 -0700 | [diff] [blame] | 115 | "-Wall", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 116 | "-Werror", |
Tom Cherry | 7d045f6 | 2019-09-30 12:58:55 -0700 | [diff] [blame] | 117 | "-Wextra", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 118 | // This is what we want to do: |
| 119 | // liblog_cflags := $(shell \ |
| 120 | // sed -n \ |
| 121 | // 's/^\([0-9]*\)[ \t]*liblog[ \t].*/-DLIBLOG_LOG_TAG=\1/p' \ |
| 122 | // $(LOCAL_PATH)/event.logtags) |
| 123 | // so make sure we do not regret hard-coding it as follows: |
Mark Salyzyn | 9633b91 | 2016-09-12 14:51:48 -0700 | [diff] [blame] | 124 | "-DLIBLOG_LOG_TAG=1006", |
Mark Salyzyn | 7ef5249 | 2016-03-25 15:50:46 -0700 | [diff] [blame] | 125 | "-DSNET_EVENT_LOG_TAG=1397638484", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 126 | ], |
Dan Willemsen | d119101 | 2016-06-01 15:32:35 -0700 | [diff] [blame] | 127 | logtags: ["event.logtags"], |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 128 | compile_multilib: "both", |
Dan Willemsen | 63aa47a | 2015-09-16 15:54:14 -0700 | [diff] [blame] | 129 | } |
Dan Albert | ddce8c7 | 2016-09-23 15:43:23 -0700 | [diff] [blame] | 130 | |
Dan Albert | b7c3996 | 2016-10-05 13:47:31 -0700 | [diff] [blame] | 131 | ndk_headers { |
Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 132 | name: "liblog_ndk_headers", |
Mark Salyzyn | bdac221 | 2016-12-21 23:15:24 +0000 | [diff] [blame] | 133 | from: "include/android", |
Dan Albert | b7c3996 | 2016-10-05 13:47:31 -0700 | [diff] [blame] | 134 | to: "android", |
Mark Salyzyn | bdac221 | 2016-12-21 23:15:24 +0000 | [diff] [blame] | 135 | srcs: ["include/android/log.h"], |
Dan Albert | 286b2ea | 2016-10-20 10:18:27 -0700 | [diff] [blame] | 136 | license: "NOTICE", |
Dan Albert | b7c3996 | 2016-10-05 13:47:31 -0700 | [diff] [blame] | 137 | } |
| 138 | |
Dan Albert | ddce8c7 | 2016-09-23 15:43:23 -0700 | [diff] [blame] | 139 | ndk_library { |
Dan Willemsen | c8202dc | 2017-04-07 15:26:08 -0700 | [diff] [blame] | 140 | name: "liblog", |
Dan Albert | ddce8c7 | 2016-09-23 15:43:23 -0700 | [diff] [blame] | 141 | symbol_file: "liblog.map.txt", |
| 142 | first_version: "9", |
Dan Albert | 9a41bce | 2017-01-05 15:55:49 -0800 | [diff] [blame] | 143 | unversioned_until: "current", |
Dan Albert | ddce8c7 | 2016-09-23 15:43:23 -0700 | [diff] [blame] | 144 | } |
Dan Willemsen | 38b4a92 | 2017-03-20 14:08:59 -0700 | [diff] [blame] | 145 | |
| 146 | llndk_library { |
Dan Willemsen | c8202dc | 2017-04-07 15:26:08 -0700 | [diff] [blame] | 147 | name: "liblog", |
dimitry | a808b11 | 2019-05-06 14:01:58 +0200 | [diff] [blame] | 148 | native_bridge_supported: true, |
Dan Willemsen | 38b4a92 | 2017-03-20 14:08:59 -0700 | [diff] [blame] | 149 | symbol_file: "liblog.map.txt", |
Dan Willemsen | 38b4a92 | 2017-03-20 14:08:59 -0700 | [diff] [blame] | 150 | export_include_dirs: ["include_vndk"], |
| 151 | } |