Merge "Base: Add an NDK-compiled version of libbase"

This commit is contained in:
Treehugger Robot 2018-02-21 06:37:08 +00:00 committed by Gerrit Code Review
commit 9b4d7dd51e
3 changed files with 29 additions and 19 deletions

View file

@ -15,7 +15,7 @@
//
cc_defaults {
name: "libbase_defaults",
name: "libbase_cflags_defaults",
cflags: [
"-Wall",
"-Werror",
@ -39,15 +39,9 @@ cc_library_headers {
},
}
cc_library {
name: "libbase",
defaults: ["libbase_defaults"],
vendor_available: true,
host_supported: true,
vndk: {
enabled: true,
support_system_process: true,
},
cc_defaults {
name: "libbase_defaults",
defaults: ["libbase_cflags_defaults"],
srcs: [
"chrono_utils.cpp",
"file.cpp",
@ -59,11 +53,6 @@ cc_library {
"test_utils.cpp",
],
header_libs: [
"libbase_headers",
],
export_header_lib_headers: ["libbase_headers"],
shared_libs: ["liblog"],
target: {
android: {
@ -100,11 +89,34 @@ cc_library {
},
}
cc_library {
name: "libbase",
defaults: ["libbase_defaults"],
vendor_available: true,
host_supported: true,
vndk: {
enabled: true,
support_system_process: true,
},
header_libs: [
"libbase_headers",
],
export_header_lib_headers: ["libbase_headers"],
}
cc_library_static {
name: "libbase_ndk",
defaults: ["libbase_defaults"],
sdk_version: "current",
stl: "c++_static",
export_include_dirs: ["include"],
}
// Tests
// ------------------------------------------------------------------------------
cc_test {
name: "libbase_test",
defaults: ["libbase_defaults"],
defaults: ["libbase_cflags_defaults"],
host_supported: true,
srcs: [
"endian_test.cpp",

View file

@ -45,7 +45,7 @@
// Headers for LogMessage::LogLine.
#ifdef __ANDROID__
#include <log/log.h>
#include <android/log.h>
#include <android/set_abort_message.h>
#else
#include <sys/types.h>

View file

@ -28,8 +28,6 @@
#include <android-base/parseint.h>
using namespace std::chrono_literals;
namespace android {
namespace base {