Alexander Dorokhine | e107c68 | 2019-11-19 15:15:41 -0800 | [diff] [blame] | 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 | |
Bob Badour | a650630 | 2021-03-01 22:29:24 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_icing_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 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 | |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 32 | cc_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", |
Alexander Dorokhine | 6684fee | 2020-08-10 14:08:49 -0700 | [diff] [blame] | 52 | "-Wno-unused-private-field", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 53 | "-Wno-extern-c-compat", |
| 54 | |
| 55 | "-funsigned-char", |
| 56 | "-fvisibility=hidden", |
| 57 | ], |
| 58 | } |
| 59 | |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 60 | cc_library_shared { |
Alexander Dorokhine | 6684fee | 2020-08-10 14:08:49 -0700 | [diff] [blame] | 61 | name: "libicing", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 62 | defaults: ["libicing_defaults"], |
| 63 | srcs: [ |
| 64 | "icing/**/*.cc", |
| 65 | ], |
| 66 | exclude_srcs: [ |
Alexander Dorokhine | 6684fee | 2020-08-10 14:08:49 -0700 | [diff] [blame] | 67 | "icing/**/*-test-*", |
| 68 | "icing/**/*-test.*", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 69 | "icing/**/*_test.cc", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 70 | "icing/**/*_benchmark.cc", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 71 | "icing/testing/**/*", |
Alexander Dorokhine | 6684fee | 2020-08-10 14:08:49 -0700 | [diff] [blame] | 72 | "icing/tokenization/reverse_jni/**/*", |
| 73 | "icing/tokenization/simple/**/*", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 74 | "icing/tools/**/*", |
Alexander Dorokhine | 6684fee | 2020-08-10 14:08:49 -0700 | [diff] [blame] | 75 | "icing/transform/map/**/*", |
| 76 | "icing/transform/simple/**/*", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 77 | ], |
Orion Hodson | 5b027d2 | 2020-04-22 10:50:21 +0100 | [diff] [blame] | 78 | header_libs: ["jni_headers"], |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 79 | static_libs: [ |
Cassie Wang | 6c3bb95 | 2020-01-20 22:39:24 -0800 | [diff] [blame] | 80 | "icing-c-proto", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 81 | "libutf", |
| 82 | ], |
| 83 | shared_libs: [ |
| 84 | "libandroidicu", |
| 85 | "liblog", |
| 86 | // TODO(b/147509515): We only need the full version for GzipStream. If we can remove |
| 87 | // that dependency, then we can just use libprotobuf-cpp-lite |
| 88 | "libprotobuf-cpp-full", |
| 89 | "libz", |
| 90 | ], |
Cassie Wang | 6c3bb95 | 2020-01-20 22:39:24 -0800 | [diff] [blame] | 91 | |
| 92 | version_script: "icing/jni.lds", |
Cassie Wang | 871e677 | 2020-01-09 14:16:43 -0800 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | // TODO(cassiewang): Add build rules and a TEST_MAPPING for cc_tests |