summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen2015-09-16 17:54:14 -0500
committerDan Willemsen2015-09-16 17:59:22 -0500
commit63aa47afd7084635a33b0bf6ff63032adff60559 (patch)
tree281a381b395660cd771251aad6810f5b5c49b3bd /liblog/Android.bp
parentfa965d9639dc264bb0d18e71dff998a4f648b50d (diff)
downloadplatform-system-core-63aa47afd7084635a33b0bf6ff63032adff60559.tar.gz
platform-system-core-63aa47afd7084635a33b0bf6ff63032adff60559.tar.xz
platform-system-core-63aa47afd7084635a33b0bf6ff63032adff60559.zip
Add Android.bp for liblog
Change-Id: Ibbb476a5e6b247cba96929e683727c25f66d90f0
Diffstat (limited to 'liblog/Android.bp')
-rw-r--r--liblog/Android.bp76
1 files changed, 76 insertions, 0 deletions
diff --git a/liblog/Android.bp b/liblog/Android.bp
new file mode 100644
index 000000000..ee394fda2
--- /dev/null
+++ b/liblog/Android.bp
@@ -0,0 +1,76 @@
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
17liblog_host_sources = [
18 "logd_write.c",
19 "log_event_write.c",
20 "fake_log_device.c",
21 //"event.logtags",
22]
23liblog_target_sources = [
24 "logd_write.c",
25 "log_event_write.c",
26 "event_tag_map.c",
27 "log_time.cpp",
28 "log_is_loggable.c",
29 "logprint.c",
30 "log_read.c",
31]
32
33// Shared and static library for host and device
34// ========================================================
35cc_library {
36 name: "liblog",
37 host_supported: true,
38
39 target: {
40 host: {
41 srcs: liblog_host_sources,
42 cflags: ["-DFAKE_LOG_DEVICE=1"],
43 },
44 android: {
45 srcs: liblog_target_sources,
46 // AddressSanitizer runtime library depends on liblog.
47 sanitize: ["never"],
48 },
49 android_arm: {
50 // TODO: This is to work around b/19059885. Remove after root cause is fixed
51 ldflags: ["-Wl,--hash-style=both"],
52 },
53 windows: {
54 srcs: ["uio.c"],
55 },
56 not_windows: {
57 srcs: ["event_tag_map.c"],
58 },
59 linux: {
60 host_ldlibs: ["-lrt"],
61 },
62 },
63
64 cflags: [
65 "-Werror",
66 // This is what we want to do:
67 // liblog_cflags := $(shell \
68 // sed -n \
69 // 's/^\([0-9]*\)[ \t]*liblog[ \t].*/-DLIBLOG_LOG_TAG=\1/p' \
70 // $(LOCAL_PATH)/event.logtags)
71 // so make sure we do not regret hard-coding it as follows:
72 "-DLIBLOG_LOG_TAG=1005",
73 ],
74 compile_multilib: "both",
75 stl: "none",
76}