Home | History | Annotate | Download | only in installd
      1 cc_defaults {
      2     name: "installd_defaults",
      3 
      4     cflags: [
      5         "-Wall",
      6         "-Werror",
      7         "-Wextra",
      8 
      9         "-Wunreachable-code",
     10         "-Wunreachable-code-break",
     11         "-Wunreachable-code-return",
     12     ],
     13     srcs: [
     14         "CacheItem.cpp",
     15         "CacheTracker.cpp",
     16         "InstalldNativeService.cpp",
     17         "QuotaUtils.cpp",
     18         "dexopt.cpp",
     19         "globals.cpp",
     20         "utils.cpp",
     21         "utils_default.cpp",
     22         "view_compiler.cpp",
     23         ":installd_aidl",
     24     ],
     25     header_libs: [
     26         "dex2oat_headers",
     27     ],
     28     shared_libs: [
     29         "libbase",
     30         "libbinder",
     31         "libcrypto",
     32         "libcutils",
     33         "liblog",
     34         "liblogwrap",
     35         "libprocessgroup",
     36         "libselinux",
     37         "libutils",
     38         "server_configurable_flags",
     39     ],
     40 
     41     product_variables: {
     42         arc: {
     43             exclude_srcs: [
     44                 "QuotaUtils.cpp",
     45             ],
     46             static_libs: [
     47                 "libarcdiskquota",
     48                 "arc_services_aidl",
     49             ],
     50             cflags: [
     51                 "-DUSE_ARC",
     52             ],
     53         },
     54     },
     55 
     56     clang: true,
     57 
     58     tidy: true,
     59     tidy_checks: [
     60         "-*",
     61         "clang-analyzer-security*",
     62         "cert-*",
     63         "-cert-err58-cpp",
     64     ],
     65     tidy_flags: [
     66         "-warnings-as-errors=clang-analyzer-security*,cert-*"
     67     ],
     68 }
     69 
     70 //
     71 // Static library used in testing and executable
     72 //
     73 
     74 cc_library_static {
     75     name: "libinstalld",
     76     defaults: ["installd_defaults"],
     77 
     78     export_include_dirs: ["."],
     79     aidl: {
     80         export_aidl_headers: true,
     81     },
     82 
     83     product_variables: {
     84         arc: {
     85             exclude_srcs: [
     86                 "QuotaUtils.cpp",
     87             ],
     88             static_libs: [
     89                 "libarcdiskquota",
     90                 "arc_services_aidl",
     91             ],
     92             cflags: [
     93                 "-DUSE_ARC",
     94             ],
     95         },
     96     },
     97 }
     98 
     99 cc_library_headers {
    100     name: "libinstalld_headers",
    101     export_include_dirs: ["."],
    102 }
    103 
    104 //
    105 // Executable
    106 //
    107 
    108 cc_binary {
    109     name: "installd",
    110     defaults: ["installd_defaults"],
    111     srcs: ["installd.cpp"],
    112 
    113     static_libs: ["libdiskusage"],
    114 
    115     init_rc: ["installd.rc"],
    116 
    117     product_variables: {
    118         arc: {
    119             exclude_srcs: [
    120                 "QuotaUtils.cpp",
    121             ],
    122             static_libs: [
    123                 "libarcdiskquota",
    124                 "arc_services_aidl",
    125             ],
    126             cflags: [
    127                 "-DUSE_ARC",
    128             ],
    129         },
    130     },
    131 
    132     // Needs to be wherever installd is as it's execed by
    133     // installd.
    134     required: [ "migrate_legacy_obb_data.sh" ],
    135 }
    136 
    137 // OTA chroot tool
    138 
    139 cc_binary {
    140     name: "otapreopt_chroot",
    141     cflags: [
    142         "-Wall",
    143         "-Werror",
    144     ],
    145     clang: true,
    146 
    147     srcs: [
    148         "otapreopt_chroot.cpp",
    149         "otapreopt_utils.cpp",
    150     ],
    151     shared_libs: [
    152         "libbase",
    153         "libbinder",
    154         "liblog",
    155         "libprotobuf-cpp-full",
    156         "libselinux",
    157         "libutils",
    158         "libziparchive",
    159     ],
    160     static_libs: [
    161         "libapex",
    162         "libapexd",
    163         "lib_apex_manifest_proto",
    164         "libavb",
    165         "libdm",
    166         "libvold_binder",
    167     ],
    168 }
    169 
    170 filegroup {
    171     name: "installd_aidl",
    172     srcs: [
    173         "binder/android/os/IInstalld.aidl",
    174     ],
    175 }
    176 
    177 //
    178 // Static library for otapreopt used in testing
    179 //
    180 cc_library_static {
    181     name: "libotapreoptparameters",
    182     cflags: [
    183         "-Wall",
    184         "-Werror"
    185     ],
    186 
    187     srcs: ["otapreopt_parameters.cpp"],
    188 
    189     export_include_dirs: ["."],
    190 
    191     shared_libs: [
    192         "libbase",
    193         "libcutils",
    194         "liblog",
    195         "libprocessgroup",
    196         "libutils",
    197     ],
    198 }
    199 
    200 //
    201 //  OTA Executable
    202 //
    203 
    204 cc_binary {
    205     name: "otapreopt",
    206     cflags: [
    207         "-Wall",
    208         "-Werror"
    209     ],
    210 
    211     srcs: [
    212         "dexopt.cpp",
    213         "globals.cpp",
    214         "otapreopt.cpp",
    215         "otapreopt_utils.cpp",
    216         "utils.cpp",
    217         "utils_default.cpp",
    218         "view_compiler.cpp",
    219     ],
    220 
    221     header_libs: ["dex2oat_headers"],
    222 
    223     static_libs: [
    224         "libartimagevalues",
    225         "libdiskusage",
    226         "libotapreoptparameters",
    227     ],
    228 
    229     shared_libs: [
    230         "libbase",
    231         "libcrypto",
    232         "libcutils",
    233         "liblog",
    234         "liblogwrap",
    235         "libprocessgroup",
    236         "libselinux",
    237         "libutils",
    238         "server_configurable_flags",
    239     ],
    240 }
    241 
    242 // OTA slot script
    243 sh_binary {
    244     name: "otapreopt_slot",
    245     src: "otapreopt_slot.sh",
    246     init_rc: ["otapreopt.rc"],
    247 }
    248 
    249 // OTA postinstall script
    250 sh_binary {
    251     name: "otapreopt_script",
    252     src: "otapreopt_script.sh",
    253     // Let this depend on otapreopt, the chroot tool and the slot script,
    254     // so we just have to mention one in a configuration.
    255     required: [
    256         "otapreopt",
    257         "otapreopt_chroot",
    258         "otapreopt_slot",
    259     ],
    260 }
    261 
    262 // Script to migrate legacy obb data.
    263 sh_binary {
    264     name: "migrate_legacy_obb_data.sh",
    265     src: "migrate_legacy_obb_data.sh"
    266 }
    267