diff --git a/base/Android.bp b/base/Android.bp index acbc6b7c0..5d70d47bd 100644 --- a/base/Android.bp +++ b/base/Android.bp @@ -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", diff --git a/base/logging.cpp b/base/logging.cpp index 0f2012a09..1f7bc2ab9 100644 --- a/base/logging.cpp +++ b/base/logging.cpp @@ -45,7 +45,7 @@ // Headers for LogMessage::LogLine. #ifdef __ANDROID__ -#include +#include #include #else #include diff --git a/base/properties.cpp b/base/properties.cpp index ca8e96fc4..6cf43f9e2 100644 --- a/base/properties.cpp +++ b/base/properties.cpp @@ -28,8 +28,6 @@ #include -using namespace std::chrono_literals; - namespace android { namespace base {