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: [ 60 "include", 61 "lib", 62 ], 63 srcs: [ 64 "lib/**/*.cc", 65 ], 66 apex_available: [ 67 "//apex_available:platform", 68 "com.android.extservices", 69 ], 70 visibility: ["//external/libtextclassifier:__subpackages__"], 71} 72 73cc_defaults { 74 name: "marisa-trie-test-defaults", 75 sdk_version: "current", 76 static_libs: ["marisa-trie"], 77 stl: "libc++_static", 78 cflags: [ 79 "-Werror", 80 "-Wall", 81 "-fexceptions", 82 "-Wno-implicit-fallthrough", 83 ], 84} 85 86cc_binary { 87 name: "marisa-marisa-test", 88 srcs: ["tests/marisa-test.cc"], 89 defaults: ["marisa-trie-test-defaults"], 90} 91 92cc_binary { 93 name: "marisa-base-test", 94 srcs: ["tests/base-test.cc"], 95 defaults: ["marisa-trie-test-defaults"], 96} 97 98cc_binary { 99 name: "marisa-vector-test", 100 srcs: ["tests/vector-test.cc"], 101 defaults: ["marisa-trie-test-defaults"], 102} 103 104cc_binary { 105 name: "marisa-trie-test", 106 srcs: ["tests/trie-test.cc"], 107 defaults: ["marisa-trie-test-defaults"], 108} 109