1// Copyright (C) 2012 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 15package { 16 default_applicable_licenses: ["eigen_license"], 17} 18 19license { 20 name: "eigen_license", 21 visibility: [":__subpackages__"], 22 license_kinds: [ 23 // Apache 2.0 is only used in Eigen/src/Core/arch/Default/BFloat16.h, 24 // which was copied from TensorFlow. 25 "SPDX-license-identifier-Apache-2.0", 26 // BSD is used in CMake build scripts, which are not used in Android, 27 // and for code derived from the MINPACK library. 28 "SPDX-license-identifier-BSD", 29 // Almost all of the actual Eigen code is licensed under MPL 2.0. 30 "SPDX-license-identifier-MPL-2.0", 31 ], 32 license_text: [ 33 "COPYING.APACHE", 34 "COPYING.BSD", 35 "COPYING.MINPACK", 36 "COPYING.MPL2", 37 "NOTICE", 38 ], 39} 40 41license { 42 name: "eigen_bench_license", 43 visibility: ["//visibility:private"], 44 license_kinds: [ 45 "SPDX-license-identifier-Apache-2.0", 46 "SPDX-license-identifier-GPL-2.0+", 47 ], 48 license_text: [ 49 "COPYING.APACHE", 50 "COPYING.GPL", 51 ], 52} 53 54license { 55 name: "eigen_restricted_code_license", 56 visibility: ["//visibility:private"], 57 license_kinds: [ 58 "SPDX-license-identifier-LGPL-2.1", 59 ], 60 license_text: ["COPYING.LGPL"], 61} 62 63filegroup { 64 name: "eigen_bench", 65 srcs: ["bench/**/*"], 66 licenses: ["eigen_bench_license"], 67 visibility: ["//visibility:private"], 68} 69 70filegroup { 71 name: "eigen_restricted_code", 72 srcs: [ 73 "unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h", 74 "unsupported/Eigen/src/IterativeSolvers/IterationController.h", 75 ], 76 licenses: ["eigen_restricted_code_license"], 77 visibility: ["//visibility:private"], 78} 79 80cc_library_headers { 81 name: "libeigen", 82 83 // Although entire directory is exported, only Eigen and unsupported/Eigen 84 // contain actual exported headers. When capturing header files for 85 // snapshot, only these two directories will be globbed. 86 export_include_dirs: ["."], 87 cflags: ["-DEIGEN_MPL2_ONLY"], 88 89 vendor_available: true, 90 host_supported: true, 91 apex_available: [ 92 "com.android.neuralnetworks", 93 "test_com.android.neuralnetworks", 94 "//apex_available:platform", 95 "com.android.ondevicepersonalization", 96 ], 97 min_sdk_version: "apex_inherit", 98 sdk_version: "current", 99} 100 101subdirs = ["blas"] 102