• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2020 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: ["external_marisa-trie_license"],
18}
19
20// Added automatically by a large-scale-change that took the approach of
21// 'apply every license found to every target'. While this makes sure we respect
22// every license restriction, it may not be entirely correct.
23//
24// e.g. GPL in an MIT project might only apply to the contrib/ directory.
25//
26// Please consider splitting the single license below into multiple licenses,
27// taking care not to lose any license_kind information, and overriding the
28// default license using the 'licenses: [...]' property on targets as needed.
29//
30// For unused files, consider creating a 'fileGroup' with "//visibility:private"
31// to attach the license to, and including a comment whether the files may be
32// used in the current project.
33// See: http://go/android-license-faq
34license {
35    name: "external_marisa-trie_license",
36    visibility: [":__subpackages__"],
37    license_kinds: [
38        "SPDX-license-identifier-BSD",
39        "SPDX-license-identifier-BSD-2-Clause",
40        "SPDX-license-identifier-LGPL",
41        "SPDX-license-identifier-LGPL-2.1+",
42    ],
43    license_text: [
44        "COPYING.md",
45    ],
46}
47
48cc_library {
49    name: "marisa-trie",
50    sdk_version: "current",
51    min_sdk_version: "30",
52    cflags: [
53        "-Werror",
54        "-Wall",
55        "-fexceptions",
56        "-Wno-implicit-fallthrough",
57    ],
58    stl: "libc++_static",
59    export_include_dirs: ["include", "lib"],
60    srcs: [
61        "lib/**/*.cc"
62    ],
63    apex_available: [
64        "//apex_available:platform",
65        "com.android.extservices",
66    ],
67    visibility: ["//external/libtextclassifier:__subpackages__"],
68}
69
70cc_defaults {
71    name: "marisa-trie-test-defaults",
72    sdk_version: "current",
73    static_libs: ["marisa-trie"],
74    stl: "libc++_static",
75    cflags: [
76        "-Werror",
77        "-Wall",
78        "-fexceptions",
79        "-Wno-implicit-fallthrough",
80    ],
81}
82
83cc_binary {
84    name: "marisa-marisa-test",
85    srcs: ["tests/marisa-test.cc"],
86    defaults: ["marisa-trie-test-defaults"],
87}
88
89cc_binary {
90    name: "marisa-base-test",
91    srcs: ["tests/base-test.cc"],
92    defaults: ["marisa-trie-test-defaults"],
93}
94
95cc_binary {
96    name: "marisa-vector-test",
97    srcs: ["tests/vector-test.cc"],
98    defaults: ["marisa-trie-test-defaults"],
99}
100
101cc_binary {
102    name: "marisa-trie-test",
103    srcs: ["tests/trie-test.cc"],
104    defaults: ["marisa-trie-test-defaults"],
105}
106