blob: dda661448d7757e6e222673ef0cfccf83a7dc5aa [file] [log] [blame]
Alexander Dorokhinee107c682019-11-19 15:15:41 -08001// 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 Badoura6506302021-03-01 22:29:24 -080015package {
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
Cassie Wang871e6772020-01-09 14:16:43 -080032cc_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 Dorokhine6684fee2020-08-10 14:08:49 -070052 "-Wno-unused-private-field",
Cassie Wang871e6772020-01-09 14:16:43 -080053 "-Wno-extern-c-compat",
54
55 "-funsigned-char",
56 "-fvisibility=hidden",
57 ],
Alexander Dorokhine67264802021-06-28 19:44:44 -070058 apex_available: ["com.android.appsearch"],
Cassie Wang871e6772020-01-09 14:16:43 -080059}
60
Cassie Wang871e6772020-01-09 14:16:43 -080061cc_library_shared {
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070062 name: "libicing",
Cassie Wang871e6772020-01-09 14:16:43 -080063 defaults: ["libicing_defaults"],
64 srcs: [
65 "icing/**/*.cc",
66 ],
67 exclude_srcs: [
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070068 "icing/**/*-test-*",
69 "icing/**/*-test.*",
Cassie Wang871e6772020-01-09 14:16:43 -080070 "icing/**/*_test.cc",
Cassie Wang871e6772020-01-09 14:16:43 -080071 "icing/**/*_benchmark.cc",
Cassie Wang871e6772020-01-09 14:16:43 -080072 "icing/testing/**/*",
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070073 "icing/tokenization/reverse_jni/**/*",
74 "icing/tokenization/simple/**/*",
Cassie Wang871e6772020-01-09 14:16:43 -080075 "icing/tools/**/*",
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070076 "icing/transform/map/**/*",
77 "icing/transform/simple/**/*",
Cassie Wang871e6772020-01-09 14:16:43 -080078 ],
Orion Hodson5b027d22020-04-22 10:50:21 +010079 header_libs: ["jni_headers"],
Cassie Wang871e6772020-01-09 14:16:43 -080080 static_libs: [
Cassie Wang6c3bb952020-01-20 22:39:24 -080081 "icing-c-proto",
Cassie Wang871e6772020-01-09 14:16:43 -080082 "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 ],
Cassie Wang6c3bb952020-01-20 22:39:24 -080092 version_script: "icing/jni.lds",
Cassie Wang871e6772020-01-09 14:16:43 -080093}
94
95// TODO(cassiewang): Add build rules and a TEST_MAPPING for cc_tests