Exporting C++ headers from system/core

Moved headers from include/libutils and include/libsysutils to
libutils/include and libsysutils/include respectively, so they can be
exported via these libs. They needed to be moved since Soong does
not allow export from external folder.

Added symlink from old locations. They are needed since Soong
includes system/core/include by default. Once all modules are
cleaned up to explicitly add the required libs, the symlinks will be
removed.

Moved headers of libutils to libutils_headers. They should be used
by modules for header-only inlines. Added libutils_headers as
dependency of libutils.

Split of C++ headers into those that have no dependency and those that
have dependency on libutils.so will be handled in a later CL.

Test: Add above libs to shared lib of local module
Change-Id: I122db72056b26b1f39bad1d9a0c2a1c5efda3550
This commit is contained in:
Vijay Venkatraman 2017-01-05 10:39:38 -08:00
parent 897bc9b2b3
commit 75acc7bf81
61 changed files with 17 additions and 0 deletions

1
include/sysutils Symbolic link
View file

@ -0,0 +1 @@
../libsysutils/include/sysutils/

1
include/utils Symbolic link
View file

@ -0,0 +1 @@
../libutils/include/utils/

View file

@ -21,5 +21,7 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libnl
LOCAL_EXPORT_C_INCLUDE_DIRS := system/core/libsysutils/include
include $(BUILD_SHARED_LIBRARY)

View file

@ -12,6 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_headers {
name: "libutils_headers",
host_supported: true,
export_include_dirs: ["include"],
target: {
windows: {
enabled: true,
},
},
}
cc_library {
name: "libutils",
host_supported: true,
@ -42,6 +53,8 @@ cc_library {
cflags: ["-Werror"],
include_dirs: ["external/safe-iop/include"],
header_libs: ["libutils_headers"],
export_header_lib_headers: ["libutils_headers"],
arch: {
mips: {