From ddce8c70c4a19cb94e6696d7abce2f9026152b10 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 23 Sep 2016 15:43:23 -0700 Subject: [PATCH] Migrate liblog to ndk_library. Test: make native Bug: http://b/30465923 Change-Id: I3db7ede817a57b3505c0556ea28f08b9e8331e1a --- Android.bp | 22 ++++++++++++++++++++++ liblog/Android.bp | 6 ++++++ liblog/liblog.map.txt | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 Android.bp create mode 100644 liblog/liblog.map.txt diff --git a/Android.bp b/Android.bp new file mode 100644 index 000000000..949a7fe3e --- /dev/null +++ b/Android.bp @@ -0,0 +1,22 @@ +// Copyright (C) 2016 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +ndk_headers { + name: "liblog_headers", + from: "include/android", + to: "android", + srcs: ["include/android/log.h"], +} + +optional_subdirs = ["*"] diff --git a/liblog/Android.bp b/liblog/Android.bp index e32f73cdc..ba7cc8a76 100644 --- a/liblog/Android.bp +++ b/liblog/Android.bp @@ -91,3 +91,9 @@ cc_library { compile_multilib: "both", stl: "none", } + +ndk_library { + name: "liblog.ndk", + symbol_file: "liblog.map.txt", + first_version: "9", +} diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt new file mode 100644 index 000000000..5f19cc15a --- /dev/null +++ b/liblog/liblog.map.txt @@ -0,0 +1,14 @@ +LIBLOG { + global: + __android_log_assert; + __android_log_btwrite; + __android_log_buf_print; # introduced-arm=21 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21 + __android_log_buf_write; # introduced-arm=21 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21 + __android_log_bwrite; + __android_log_dev_available; + __android_log_print; + __android_log_vprint; + __android_log_write; + local: + *; +};