blob: 87ed49e6db52a2ac013894f43a83032dba8db991 [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 ],
58}
59
Cassie Wang871e6772020-01-09 14:16:43 -080060cc_library_shared {
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070061 name: "libicing",
Cassie Wang871e6772020-01-09 14:16:43 -080062 defaults: ["libicing_defaults"],
63 srcs: [
64 "icing/**/*.cc",
65 ],
66 exclude_srcs: [
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070067 "icing/**/*-test-*",
68 "icing/**/*-test.*",
Cassie Wang871e6772020-01-09 14:16:43 -080069 "icing/**/*_test.cc",
Cassie Wang871e6772020-01-09 14:16:43 -080070 "icing/**/*_benchmark.cc",
Cassie Wang871e6772020-01-09 14:16:43 -080071 "icing/testing/**/*",
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070072 "icing/tokenization/reverse_jni/**/*",
73 "icing/tokenization/simple/**/*",
Cassie Wang871e6772020-01-09 14:16:43 -080074 "icing/tools/**/*",
Alexander Dorokhine6684fee2020-08-10 14:08:49 -070075 "icing/transform/map/**/*",
76 "icing/transform/simple/**/*",
Cassie Wang871e6772020-01-09 14:16:43 -080077 ],
Orion Hodson5b027d22020-04-22 10:50:21 +010078 header_libs: ["jni_headers"],
Cassie Wang871e6772020-01-09 14:16:43 -080079 static_libs: [
Cassie Wang6c3bb952020-01-20 22:39:24 -080080 "icing-c-proto",
Cassie Wang871e6772020-01-09 14:16:43 -080081 "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 Wang6c3bb952020-01-20 22:39:24 -080091
92 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