1// Copyright (C) 2018 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_defaults { 21 name: "nogrod_defaults", 22 defaults: ["berberis_defaults_64"], 23 cpp_std: "c++20", 24} 25 26cc_library { 27 name: "libnogrod", 28 defaults: ["nogrod_defaults"], 29 host_supported: true, 30 srcs: [ 31 "byte_input_stream.cc", 32 "dwarf_info.cc", 33 "dwarf_abbrev.cc", 34 "elf_reader.cc", 35 "leb128.cc", 36 ], 37 header_libs: [ 38 "libberberis_base_headers", 39 ], 40 static_libs: [ 41 "libberberis_base", 42 "libbase", 43 "liblog", 44 "libzstd", 45 ], 46} 47 48cc_test_host { 49 name: "nogrod_unit_tests", 50 defaults: ["nogrod_defaults"], 51 srcs: [ 52 "byte_input_stream_tests.cc", 53 "buffer_tests.cc", 54 "leb128_tests.cc", 55 "string_offset_table_tests.cc", 56 ], 57 58 static_libs: [ 59 "libberberis_base", 60 "libnogrod", 61 "libbase", 62 "liblog", 63 ], 64 test_suites: ["device-tests"], 65 test_options: { 66 unit_test: true, 67 }, 68} 69 70cc_binary_host { 71 name: "dwarf_reader", 72 defaults: ["nogrod_defaults"], 73 srcs: ["main.cc"], 74 shared_libs: ["libnogrod"], 75 static_libs: [ 76 "libberberis_base", 77 "libjsoncpp", 78 ], 79 cflags: [ 80 // jsoncpp uses volatile. 81 "-Wno-deprecated-volatile", 82 ], 83} 84