Move libsigchain out of static/shared properties
Using the static/shared properties causes Soong to skip the
optimization that reuses .o files between the static and shared
variants of a library. libart uses static.static_libs and
shared.shared_libs to select between libsigchain and
libsigchain_dummy. This doesn't actually do anything, because
dependencies from the static variant are only used to import
includes. Always use libsigchain in shared_libs, the final
binary that links against static libart will pull in the
correct libsigchain_dummy dependency through
libart_static_base_defaults. This halves the number of times
that the code in art/runtime is compiled.
Also make libsigchain and libsigchain_dummy export their includes
so that libart doesn't need to manually specify include_dirs.
Test: m libart
Change-Id: I83b02001d698bb9c9e26fd1467283116356b5bf1
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 8c81f81..fcb9767 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -383,9 +383,6 @@
generated_headers: ["cpp-define-generator-asm-support"],
// export our headers so the libart-gtest targets can use it as well.
export_generated_headers: ["cpp-define-generator-asm-support"],
- include_dirs: [
- "art/sigchainlib",
- ],
header_libs: [
"art_cmdlineparser_headers",
"cpp-define-generator-definitions",
@@ -402,13 +399,8 @@
// For common macros.
"libbase",
"libunwindstack",
+ "libsigchain",
],
- static: {
- static_libs: ["libsigchain_dummy"],
- },
- shared: {
- shared_libs: ["libsigchain"],
- },
export_include_dirs: ["."],
// ART's macros.h depends on libbase's macros.h.
// Note: runtime_options.h depends on cmdline. But we don't really want to export this