1// Copyright (C) 2019 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 15package { 16 default_applicable_licenses: ["external_icing_license"], 17} 18 19// Added automatically by a large-scale-change 20// See: http://go/android-license-faq 21license { 22 name: "external_icing_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 ], 27 license_text: [ 28 "LICENSE", 29 ], 30} 31 32cc_defaults { 33 name: "libicing_defaults", 34 35 // For debug / treemap purposes. 36 //strip: { 37 // keep_symbols: true, 38 //}, 39 40 cflags: [ 41 "-Wall", 42 "-Werror", 43 "-Wextra", 44 "-Wno-deprecated-declarations", 45 "-Wno-ignored-qualifiers", 46 "-Wno-missing-field-initializers", 47 "-Wno-sign-compare", 48 "-Wno-tautological-constant-out-of-range-compare", 49 "-Wno-undefined-var-template", 50 "-Wno-unused-function", 51 "-Wno-unused-parameter", 52 "-Wno-unused-private-field", 53 "-Wno-extern-c-compat", 54 55 "-funsigned-char", 56 "-fvisibility=hidden", 57 ], 58 apex_available: ["com.android.appsearch"], 59} 60 61cc_library_shared { 62 name: "libicing", 63 defaults: ["libicing_defaults"], 64 srcs: [ 65 "icing/**/*.cc", 66 ], 67 exclude_srcs: [ 68 "icing/**/*-test-*", 69 "icing/**/*-test.*", 70 "icing/**/*_test.cc", 71 "icing/**/*_benchmark.cc", 72 "icing/testing/**/*", 73 "icing/tokenization/reverse_jni/**/*", 74 "icing/tokenization/simple/**/*", 75 "icing/tools/**/*", 76 "icing/transform/map/**/*", 77 "icing/transform/simple/**/*", 78 ], 79 header_libs: ["jni_headers"], 80 static_libs: [ 81 "icing-c-proto", 82 "libutf", 83 ], 84 shared_libs: [ 85 "libandroidicu", 86 "liblog", 87 // TODO(b/147509515): We only need the full version for GzipStream. If we can remove 88 // that dependency, then we can just use libprotobuf-cpp-lite 89 "libprotobuf-cpp-full", 90 "libz", 91 ], 92 version_script: "icing/jni.lds", 93} 94 95// TODO(cassiewang): Add build rules and a TEST_MAPPING for cc_tests 96