011ee12b1d
adbd has been built as a static executable since the same binary was copied to the recovery partition where shared library is not supported. However, since we now support shared library in the recovery partition, adbd is built as a dynamic executable. In addition, the dependency from adbd to libdebuggerd_handler is removed as debuggerd is handled by the dynamic linker. A few more modules in /system/core are marked as recovery_available: true as they are transitive dependencies of the dynamic linker. This change also includes ld.config.recovery.txt which is the linker config file for the recovery mode. It is installed to /etc/ld.config.txt and contains linker namespace config for the dynamic binaries under /sbin. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: Select 'mount /system' in the recovery mode, then `adb shell`. $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: I363d5a787863f1677ee40afb5d5841321ddaae77
161 lines
3.2 KiB
Text
161 lines
3.2 KiB
Text
//
|
|
// Copyright (C) 2013 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
cc_defaults {
|
|
name: "libziparchive_flags",
|
|
cflags: [
|
|
// ZLIB_CONST turns on const for input buffers, which is pretty standard.
|
|
"-DZLIB_CONST",
|
|
"-Werror",
|
|
"-Wall",
|
|
"-D_FILE_OFFSET_BITS=64",
|
|
],
|
|
cppflags: [
|
|
"-Wold-style-cast",
|
|
// Incorrectly warns when C++11 empty brace {} initializer is used.
|
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489
|
|
"-Wno-missing-field-initializers",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "libziparchive_defaults",
|
|
srcs: [
|
|
"zip_archive.cc",
|
|
"zip_archive_stream_entry.cc",
|
|
"zip_writer.cc",
|
|
],
|
|
|
|
target: {
|
|
windows: {
|
|
cflags: ["-mno-ms-bitfields"],
|
|
|
|
enabled: true,
|
|
},
|
|
},
|
|
|
|
shared_libs: [
|
|
"libbase",
|
|
"liblog",
|
|
],
|
|
|
|
export_include_dirs: ["include"],
|
|
}
|
|
|
|
cc_library {
|
|
name: "libziparchive",
|
|
host_supported: true,
|
|
vendor_available: true,
|
|
recovery_available: true,
|
|
vndk: {
|
|
enabled: true,
|
|
},
|
|
double_loadable: true,
|
|
|
|
defaults: [
|
|
"libziparchive_defaults",
|
|
"libziparchive_flags",
|
|
],
|
|
shared_libs: [
|
|
"liblog",
|
|
"libbase",
|
|
"libz",
|
|
],
|
|
target: {
|
|
android: {
|
|
shared_libs: [
|
|
"libutils",
|
|
],
|
|
},
|
|
host: {
|
|
static_libs: ["libutils"],
|
|
},
|
|
linux_bionic: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
// Tests.
|
|
cc_test {
|
|
name: "ziparchive-tests",
|
|
host_supported: true,
|
|
defaults: ["libziparchive_flags"],
|
|
|
|
data: [
|
|
"testdata/**/*",
|
|
],
|
|
|
|
srcs: [
|
|
"entry_name_utils_test.cc",
|
|
"zip_archive_test.cc",
|
|
"zip_writer_test.cc",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"liblog",
|
|
],
|
|
|
|
static_libs: [
|
|
"libziparchive",
|
|
"libz",
|
|
"libutils",
|
|
],
|
|
|
|
target: {
|
|
host: {
|
|
cppflags: ["-Wno-unnamed-type-template-args"],
|
|
},
|
|
windows: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
// Performance benchmarks.
|
|
cc_benchmark {
|
|
name: "ziparchive-benchmarks",
|
|
defaults: ["libziparchive_flags"],
|
|
|
|
srcs: [
|
|
"zip_archive_benchmark.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"liblog",
|
|
],
|
|
|
|
static_libs: [
|
|
"libziparchive",
|
|
"libz",
|
|
"libutils",
|
|
],
|
|
|
|
target: {
|
|
host: {
|
|
cppflags: ["-Wno-unnamed-type-template-args"],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "unzip",
|
|
defaults: ["libziparchive_flags"],
|
|
srcs: ["unzip.cpp"],
|
|
shared_libs: [
|
|
"libbase",
|
|
"libziparchive",
|
|
],
|
|
}
|