Home | History | Annotate | Download | only in relocation_packer
      1 //
      2 // Copyright (C) 2015 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: "relocation_packer_flags",
     19     cppflags: [
     20         "-Wall",
     21         "-Wextra",
     22         "-Wunused",
     23         "-Werror",
     24         "-Wold-style-cast",
     25     ],
     26 
     27     target: {
     28         darwin: {
     29             enabled: false,
     30         },
     31     },
     32 }
     33 
     34 cc_library_host_static {
     35     name: "lib_relocation_packer",
     36     defaults: ["relocation_packer_flags"],
     37     srcs: [
     38         "src/debug.cc",
     39         "src/delta_encoder.cc",
     40         "src/elf_file.cc",
     41         "src/packer.cc",
     42         "src/sleb128.cc",
     43     ],
     44 
     45     static_libs: [
     46         "libelf",
     47         "libz",
     48     ],
     49 }
     50 
     51 cc_binary_host {
     52     name: "relocation_packer",
     53     defaults: ["relocation_packer_flags"],
     54 
     55     srcs: ["src/main.cc"],
     56     static_libs: [
     57         "lib_relocation_packer",
     58         "libelf",
     59         "libz",
     60         "libbase",
     61     ],
     62 
     63     // Statically linking libc++ to make it work from prebuilts
     64     stl: "libc++_static",
     65 }
     66 
     67 cc_test_host {
     68     name: "relocation_packer_unit_tests",
     69     defaults: ["relocation_packer_flags"],
     70 
     71     srcs: [
     72         "src/debug_unittest.cc",
     73         "src/delta_encoder_unittest.cc",
     74         "src/elf_file_unittest.cc",
     75         "src/sleb128_unittest.cc",
     76         "src/packer_unittest.cc",
     77     ],
     78 
     79     static_libs: [
     80         "lib_relocation_packer",
     81         "libelf",
     82         "libz",
     83     ],
     84 }
     85