Build adbd for recovery

adbd (and its dependencies) are marked as recovery_available:true so
that recovery version of the binary is built separately from the one for
system partition. This allows us to stop copying the system version to
the recovery partition and also opens up the way to enable shared
libraries in the recovery partition. Then we can also build adbd as a
dynamic executable.

Bug: 79146551
Test: m -j adbd.recovery
Change-Id: Ib95614c7435f9d0afc02a0c7d5ae1a94e439e32a
This commit is contained in:
Jiyong Park 2018-05-24 14:11:00 +09:00
parent 98c1b1ccf6
commit a0e75045e6
15 changed files with 32 additions and 2 deletions

View File

@ -276,6 +276,7 @@ cc_binary_host {
cc_library_static {
name: "libadbd",
defaults: ["adb_defaults"],
recovery_available: true,
// libminadbd wants both, for some reason.
compile_multilib: "both",
@ -302,6 +303,7 @@ cc_binary {
// adbd must be static, as it is copied into the recovery image.
static_executable: true,
recovery_available: true,
srcs: [
"daemon/main.cpp",

View File

@ -95,6 +95,7 @@ cc_library {
name: "libbase",
defaults: ["libbase_defaults"],
vendor_available: true,
recovery_available: true,
host_supported: true,
vndk: {
enabled: true,

View File

@ -17,6 +17,7 @@ cc_defaults {
cc_library_headers {
name: "libdebuggerd_common_headers",
export_include_dirs: ["common/include"],
recovery_available: true,
}
cc_library_shared {
@ -67,6 +68,7 @@ cc_library_static {
cc_library_static {
name: "libdebuggerd_handler_core",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: ["handler/debuggerd_handler.cpp"],
header_libs: [
@ -88,6 +90,7 @@ cc_library_static {
cc_library_static {
name: "libdebuggerd_handler",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: ["handler/debuggerd_fallback_nop.cpp"],
whole_static_libs: [
@ -143,6 +146,7 @@ cc_library {
cc_library_static {
name: "libdebuggerd",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: [
"libdebuggerd/backtrace.cpp",

View File

@ -36,6 +36,7 @@ cc_library {
name: "libdemangle",
defaults: ["libdemangle_defaults"],
vendor_available: true,
recovery_available: true,
srcs: [
"Demangler.cpp",

View File

@ -2,6 +2,7 @@ cc_library_static {
name: "libdiagnose_usb",
cflags: ["-Wall", "-Wextra", "-Werror"],
host_supported: true,
recovery_available: true,
target: {
windows: {
enabled: true,

View File

@ -33,6 +33,7 @@ cc_defaults {
cc_library_static {
name: "libfs_mgr",
defaults: ["fs_mgr_defaults"],
recovery_available: true,
export_include_dirs: ["include"],
include_dirs: ["system/vold"],
srcs: [
@ -79,6 +80,7 @@ cc_library_static {
cc_library_static {
name: "libfstab",
vendor_available: true,
recovery_available: true,
defaults: ["fs_mgr_defaults"],
srcs: [
"fs_mgr_fstab.cpp",

View File

@ -27,6 +27,7 @@ cc_library {
name: "libasyncio",
defaults: ["libasyncio_defaults"],
vendor_available: true,
recovery_available: true,
host_supported: true,
srcs: [
"AsyncIO.cpp",

View File

@ -58,6 +58,7 @@ cc_library_headers {
cc_library {
name: "libbacktrace",
vendor_available: false,
recovery_available: true,
vndk: {
enabled: true,
support_system_process: true,
@ -102,8 +103,6 @@ cc_library {
include_dirs: [
"art/runtime",
],
header_libs: ["jni_headers"],
},
android: {
static_libs: ["libasync_safe"],
@ -112,6 +111,10 @@ cc_library {
cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
exclude_shared_libs: ["libdexfile"],
},
recovery: {
cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
exclude_shared_libs: ["libdexfile"],
},
},
whole_static_libs: ["libdemangle"],
}

View File

@ -17,6 +17,7 @@
cc_library {
name: "libcrypto_utils",
vendor_available: true,
recovery_available: true,
vndk: {
enabled: true,
},

View File

@ -2,6 +2,7 @@ cc_library {
name: "libkeyutils",
cflags: ["-Werror"],
defaults: ["linux_bionic_supported"],
recovery_available: true,
export_include_dirs: ["include/"],
local_include_dirs: ["include/"],
srcs: ["keyutils.cpp"],

View File

@ -27,6 +27,7 @@ cc_library {
name: "libprocinfo",
defaults: ["libprocinfo_defaults"],
vendor_available: true,
recovery_available: true,
vndk: {
enabled: true,
},

View File

@ -3,6 +3,7 @@
cc_library {
name: "libsparse",
host_supported: true,
recovery_available: true,
unique_host_soname: true,
srcs: [
"backed_block.c",

View File

@ -38,6 +38,7 @@ cc_defaults {
cc_library {
name: "libunwindstack",
vendor_available: true,
recovery_available: true,
vndk: {
enabled: true,
support_system_process: true,
@ -93,6 +94,14 @@ cc_library {
],
exclude_shared_libs: ["libdexfile"],
},
recovery: {
cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
exclude_srcs: [
"DexFile.cpp",
"DexFiles.cpp",
],
exclude_shared_libs: ["libdexfile"],
},
},
arch: {

View File

@ -12,6 +12,7 @@ cc_defaults {
cc_library {
name: "liblogwrap",
defaults: ["logwrapper_defaults"],
recovery_available: true,
srcs: ["logwrap.c"],
shared_libs: [
"libcutils",

View File

@ -3,6 +3,7 @@
cc_library_static {
name: "libqemu_pipe",
vendor_available: true,
recovery_available: true,
sanitize: {
misc_undefined: ["integer"],
},