1/*
2 * Copyright 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    default_applicable_licenses: [
19        "packages_modules_NeuralNetworks_license",
20    ],
21}
22
23// See: http://go/android-license-faq
24license {
25    name: "packages_modules_NeuralNetworks_license",
26    package_name: "Android Neural Networks API",
27    visibility: [":__subpackages__"],
28    license_kinds: [
29        "SPDX-license-identifier-Apache-2.0",
30        "SPDX-license-identifier-BSD",
31    ],
32    license_text: [
33        "LICENSE",
34        "LICENSE_BSD",
35    ],
36}
37
38cc_defaults {
39    name: "neuralnetworks_defaults",
40    cflags: [
41        "-O3",
42        "-Wall",
43        "-Werror",
44        "-Wextra",
45    ],
46    arch: {
47        x86: {
48            avx2: {
49                cflags: [
50                    "-mavx2",
51                    "-mfma",
52                ],
53            },
54        },
55        x86_64: {
56            avx2: {
57                cflags: [
58                    "-mavx2",
59                    "-mfma",
60                ],
61            },
62        },
63    },
64    product_variables: {
65        debuggable: { // eng and userdebug builds
66            cflags: ["-DNN_DEBUGGABLE"],
67        },
68    },
69}
70