Home | History | Annotate | Download | only in fs_mgr
      1 //
      2 // Copyright (C) 2017 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 //
     16 
     17 cc_defaults {
     18     name: "fs_mgr_defaults",
     19     sanitize: {
     20         misc_undefined: ["integer"],
     21     },
     22     local_include_dirs: ["include/"],
     23     cflags: [
     24         "-Wall",
     25         "-Werror",
     26         "-Wno-unused-variable",
     27     ],
     28     cppflags: [
     29         "-std=gnu++1z",
     30     ],
     31 }
     32 
     33 cc_library_static {
     34     name: "libfs_mgr",
     35     defaults: ["fs_mgr_defaults"],
     36     export_include_dirs: ["include"],
     37     include_dirs: ["system/vold"],
     38     srcs: [
     39         "fs_mgr.cpp",
     40         "fs_mgr_dm_ioctl.cpp",
     41         "fs_mgr_format.cpp",
     42         "fs_mgr_verity.cpp",
     43         "fs_mgr_avb.cpp",
     44         "fs_mgr_avb_ops.cpp",
     45     ],
     46     static_libs: [
     47         "libfec",
     48         "libfec_rs",
     49         "libbase",
     50         "libcrypto_utils",
     51         "libcrypto",
     52         "libext4_utils",
     53         "libsquashfs_utils",
     54         "libselinux",
     55         "libavb",
     56         "libfstab",
     57     ],
     58     export_static_lib_headers: [
     59         "libfstab",
     60     ],
     61     whole_static_libs: [
     62         "liblogwrap",
     63         "libfstab",
     64     ],
     65     cppflags: [
     66         "-DALLOW_ADBD_DISABLE_VERITY=0",
     67     ],
     68     product_variables: {
     69         debuggable: {
     70             cppflags: [
     71                 "-UALLOW_ADBD_DISABLE_VERITY",
     72                 "-DALLOW_ADBD_DISABLE_VERITY=1",
     73             ],
     74         },
     75     },
     76 }
     77 
     78 cc_library_static {
     79     name: "libfstab",
     80     vendor_available: true,
     81     defaults: ["fs_mgr_defaults"],
     82     srcs: [
     83         "fs_mgr_fstab.cpp",
     84         "fs_mgr_boot_config.cpp",
     85         "fs_mgr_slotselect.cpp",
     86     ],
     87     export_include_dirs: ["include_fstab"],
     88     header_libs: ["libbase_headers"],
     89 }
     90