blob: d9b16535b5365c44a4557ec778c7b53f894da49a [file] [log] [blame]
Miao Wang43547b62017-12-07 14:11:43 -08001// Copyright (C) 2017 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 Badour3708cdc2021-02-12 20:28:57 -080015package {
16 default_applicable_licenses: ["external_tensorflow_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32//
33// large-scale-change included anything that looked like it might be a license
34// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
35//
36// Please consider removing redundant or irrelevant files from 'license_text:'.
37//
38// large-scale-change filtered out the below license kinds as false-positives:
39// SPDX-license-identifier-CC-BY-SA
40// SPDX-license-identifier-MPL-2.0
41// See: http://go/android-license-faq
42license {
43 name: "external_tensorflow_license",
44 visibility: [":__subpackages__"],
45 license_kinds: [
46 "SPDX-license-identifier-Apache-2.0",
47 "SPDX-license-identifier-BSD",
48 "SPDX-license-identifier-MIT",
49 "legacy_unencumbered",
50 ],
51 license_text: [
52 "LICENSE",
53 "NOTICE",
54 ],
55}
56
Miao Wang43547b62017-12-07 14:11:43 -080057cc_library_headers {
58 name: "tensorflow_headers",
59 export_include_dirs: ["."],
Miao Wanga07e14c2017-12-14 15:30:54 -080060 vendor_available: true,
Shih-Ming Wang7e98d512021-01-29 17:19:18 -080061 host_supported: true,
Tony Make25f94d2019-06-12 15:54:10 +010062 sdk_version: "current",
Przemyslaw Szczepaniake549a692020-01-31 15:46:22 +000063 apex_available: [
Lev Proleeva4919982021-02-26 20:30:08 +000064 "//apex_available:platform",
65 "com.android.extservices",
Przemyslaw Szczepaniake549a692020-01-31 15:46:22 +000066 "com.android.neuralnetworks",
67 "test_com.android.neuralnetworks",
Przemyslaw Szczepaniake549a692020-01-31 15:46:22 +000068 ],
Miao Wang43547b62017-12-07 14:11:43 -080069}
70
Lev Proleeva4919982021-02-26 20:30:08 +000071genrule {
72 name: "libtflite_mutable_schema",
73 tools: ["flatc"],
74 cmd: "$(location flatc) --cpp --no-union-value-namespacing --gen-object-api --gen-mutable --keep-prefix -o $$(dirname $(out)) $(in)",
75 srcs: [ "tensorflow/lite/schema/schema.fbs" ],
76 out: [ "tensorflow/lite/schema/mutable/schema_generated.h" ],
77}
78
Miao Wangaa0a2982019-01-17 18:35:59 -080079subdirs = ["tensorflow/lite"]
Yuntao Xu34a8a2b2021-05-19 19:52:49 -070080
81cc_library_static {
82 name: "TfliteNnapiDelegateTests_static",
83 srcs: [
84 "tensorflow/lite/delegates/nnapi/nnapi_delegate_test.cc",
85 "tensorflow/lite/kernels/test_util.cc",
86 "tensorflow/core/platform/default/logging.cc",
87 "tensorflow/core/platform/default/env_time.cc",
88 "tensorflow/lite/kernels/acceleration_test_util.cc",
89 "tensorflow/lite/kernels/acceleration_test_util_internal.cc",
90 "tensorflow/lite/delegates/nnapi/acceleration_test_list.cc",
91 "tensorflow/lite/delegates/nnapi/acceleration_test_util.cc",
92 ],
93 include_dirs: [
94 "external/flatbuffers/include",
95 "external/tensorflow",
96 "external/ruy",
97 ],
98 cflags: [
99 "-DPLATFORM_POSIX_ANDROID",
100 "-Wextra",
101 "-Wno-extern-c-compat",
102 "-Wno-sign-compare",
103 "-Wno-unused-parameter",
104 "-Wno-unused-private-field",
105 ],
106 shared_libs: [
107 "libandroid",
108 "liblog",
109 "libneuralnetworks",
110 ],
111 static_libs: [
112 "libgtest_ndk_c++",
113 "libgmock_ndk",
114 "libtflite_static",
115 ],
116 header_libs: [
117 "libeigen",
118 "gemmlowp_headers",
119 "libtflite_schema_headers",
120 ],
121 sdk_version: "current",
122 stl: "c++_static",
123}