2019-07-03 20:59:47 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 2018 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.
|
|
|
|
//
|
|
|
|
|
2019-08-01 21:37:35 +00:00
|
|
|
cc_defaults {
|
|
|
|
name: "libsnapshot_defaults",
|
2019-07-03 20:59:47 +00:00
|
|
|
defaults: ["fs_mgr_defaults"],
|
2019-08-01 21:37:35 +00:00
|
|
|
cflags: [
|
2019-07-03 20:59:47 +00:00
|
|
|
"-D_FILE_OFFSET_BITS=64",
|
2019-08-01 21:37:35 +00:00
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
2019-07-03 20:59:47 +00:00
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
2019-07-26 00:52:08 +00:00
|
|
|
"liblp",
|
2019-07-03 20:59:47 +00:00
|
|
|
],
|
|
|
|
static_libs: [
|
2019-10-09 23:24:03 +00:00
|
|
|
"libcutils",
|
2019-07-03 20:59:47 +00:00
|
|
|
"libdm",
|
2019-08-15 19:50:38 +00:00
|
|
|
"libfs_mgr",
|
2019-07-26 00:52:08 +00:00
|
|
|
"libfstab",
|
2019-08-15 19:50:38 +00:00
|
|
|
"liblp",
|
2019-09-13 21:49:53 +00:00
|
|
|
"update_metadata-protos",
|
2019-08-01 21:37:35 +00:00
|
|
|
],
|
|
|
|
whole_static_libs: [
|
2019-07-03 20:59:47 +00:00
|
|
|
"libext2_uuid",
|
2019-08-01 21:37:35 +00:00
|
|
|
"libext4_utils",
|
2019-08-09 23:26:31 +00:00
|
|
|
"libfstab",
|
2019-07-03 20:59:47 +00:00
|
|
|
],
|
2019-08-14 00:21:32 +00:00
|
|
|
header_libs: [
|
|
|
|
"libfiemap_headers",
|
|
|
|
],
|
2019-09-13 21:49:53 +00:00
|
|
|
export_static_lib_headers: [
|
|
|
|
"update_metadata-protos",
|
|
|
|
],
|
2019-08-14 00:21:32 +00:00
|
|
|
export_header_lib_headers: [
|
|
|
|
"libfiemap_headers",
|
|
|
|
],
|
2019-07-03 20:59:47 +00:00
|
|
|
export_include_dirs: ["include"],
|
2019-10-01 20:59:56 +00:00
|
|
|
proto: {
|
|
|
|
type: "lite",
|
|
|
|
export_proto_headers: true,
|
|
|
|
canonical_path_from_root: false,
|
|
|
|
},
|
2019-07-03 20:59:47 +00:00
|
|
|
}
|
2019-08-01 21:37:35 +00:00
|
|
|
|
2019-10-09 23:24:03 +00:00
|
|
|
cc_defaults {
|
|
|
|
name: "libsnapshot_hal_deps",
|
|
|
|
cflags: [
|
|
|
|
"-DLIBSNAPSHOT_USE_HAL",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"android.hardware.boot@1.0",
|
|
|
|
"android.hardware.boot@1.1",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2019-08-01 21:37:35 +00:00
|
|
|
filegroup {
|
|
|
|
name: "libsnapshot_sources",
|
|
|
|
srcs: [
|
2019-10-01 20:59:56 +00:00
|
|
|
"android/snapshot/snapshot.proto",
|
2019-08-01 21:37:35 +00:00
|
|
|
"snapshot.cpp",
|
2019-09-13 21:49:53 +00:00
|
|
|
"snapshot_metadata_updater.cpp",
|
2019-07-26 00:52:08 +00:00
|
|
|
"partition_cow_creator.cpp",
|
2019-08-28 01:37:41 +00:00
|
|
|
"utility.cpp",
|
2019-08-01 21:37:35 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2019-08-29 23:29:22 +00:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libsnapshot_headers",
|
|
|
|
recovery_available: true,
|
|
|
|
defaults: ["libsnapshot_defaults"],
|
|
|
|
}
|
|
|
|
|
2019-08-01 21:37:35 +00:00
|
|
|
cc_library_static {
|
|
|
|
name: "libsnapshot",
|
2019-10-09 23:24:03 +00:00
|
|
|
defaults: [
|
|
|
|
"libsnapshot_defaults",
|
|
|
|
"libsnapshot_hal_deps",
|
|
|
|
],
|
2019-08-01 21:37:35 +00:00
|
|
|
srcs: [":libsnapshot_sources"],
|
2019-08-14 00:21:32 +00:00
|
|
|
whole_static_libs: [
|
2019-08-01 21:37:35 +00:00
|
|
|
"libfiemap_binder",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
2019-10-09 23:24:03 +00:00
|
|
|
name: "libsnapshot_init",
|
2019-08-01 21:37:35 +00:00
|
|
|
defaults: ["libsnapshot_defaults"],
|
|
|
|
srcs: [":libsnapshot_sources"],
|
|
|
|
recovery_available: true,
|
2019-08-14 00:21:32 +00:00
|
|
|
whole_static_libs: [
|
|
|
|
"libfiemap_passthrough",
|
|
|
|
],
|
2019-08-01 21:37:35 +00:00
|
|
|
}
|
|
|
|
|
2019-10-09 23:24:03 +00:00
|
|
|
cc_library_static {
|
|
|
|
name: "libsnapshot_nobinder",
|
|
|
|
defaults: [
|
|
|
|
"libsnapshot_defaults",
|
|
|
|
"libsnapshot_hal_deps",
|
|
|
|
],
|
|
|
|
srcs: [":libsnapshot_sources"],
|
|
|
|
recovery_available: true,
|
|
|
|
whole_static_libs: [
|
|
|
|
"libfiemap_passthrough",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2019-08-01 21:37:35 +00:00
|
|
|
cc_test {
|
|
|
|
name: "libsnapshot_test",
|
|
|
|
defaults: ["libsnapshot_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"snapshot_test.cpp",
|
2019-07-26 00:52:08 +00:00
|
|
|
"partition_cow_creator_test.cpp",
|
2019-09-13 21:49:53 +00:00
|
|
|
"snapshot_metadata_updater_test.cpp",
|
2019-08-15 02:15:19 +00:00
|
|
|
"test_helpers.cpp",
|
2019-08-01 21:37:35 +00:00
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbinder",
|
2019-10-09 23:24:03 +00:00
|
|
|
"libhidlbase",
|
2019-09-13 21:49:53 +00:00
|
|
|
"libprotobuf-cpp-lite",
|
2019-08-01 21:37:35 +00:00
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
static_libs: [
|
2019-10-09 23:24:03 +00:00
|
|
|
"android.hardware.boot@1.0",
|
|
|
|
"android.hardware.boot@1.1",
|
2019-09-18 18:04:35 +00:00
|
|
|
"libcrypto_static",
|
2019-08-01 21:37:35 +00:00
|
|
|
"libfs_mgr",
|
2019-08-23 01:19:17 +00:00
|
|
|
"libgmock",
|
2019-08-01 21:37:35 +00:00
|
|
|
"liblp",
|
|
|
|
"libsnapshot",
|
2019-07-26 00:52:08 +00:00
|
|
|
"libsparse",
|
|
|
|
"libz",
|
2019-08-01 21:37:35 +00:00
|
|
|
],
|
2019-09-12 20:00:54 +00:00
|
|
|
header_libs: [
|
|
|
|
"libstorage_literals_headers",
|
|
|
|
],
|
2019-08-01 21:37:35 +00:00
|
|
|
}
|
2019-09-17 01:49:43 +00:00
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "snapshotctl",
|
|
|
|
srcs: [
|
|
|
|
"snapshotctl.cpp",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libdm",
|
|
|
|
"libext2_uuid",
|
|
|
|
"libfiemap_binder",
|
|
|
|
"libfstab",
|
|
|
|
"libsnapshot",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
2019-10-09 23:24:03 +00:00
|
|
|
"android.hardware.boot@1.0",
|
|
|
|
"android.hardware.boot@1.1",
|
2019-09-17 01:49:43 +00:00
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
2019-10-09 23:24:03 +00:00
|
|
|
"libbinderthreadstate",
|
2019-09-17 01:49:43 +00:00
|
|
|
"libext4_utils",
|
|
|
|
"libfs_mgr",
|
2019-10-09 23:24:03 +00:00
|
|
|
"libhidlbase",
|
2019-09-17 01:49:43 +00:00
|
|
|
"liblog",
|
|
|
|
"liblp",
|
2019-10-01 20:59:56 +00:00
|
|
|
"libprotobuf-cpp-lite",
|
|
|
|
"libutils",
|
2019-09-17 01:49:43 +00:00
|
|
|
],
|
2019-09-17 23:10:24 +00:00
|
|
|
init_rc: [
|
|
|
|
"snapshotctl.rc",
|
|
|
|
],
|
2019-09-17 01:49:43 +00:00
|
|
|
}
|