xref: /aosp_15_r20/external/ruy/Android.bp (revision bb86c7ed5fb1b98a7eac808e443a46cc8b90dfc0)
1// Copyright (C) 2021 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: ["external_ruy_license"],
17}
18
19// Added automatically by a large-scale-change
20// See: http://go/android-license-faq
21license {
22    name: "external_ruy_license",
23    visibility: [":__subpackages__"],
24    license_kinds: [
25        "SPDX-license-identifier-Apache-2.0",
26    ],
27    license_text: [
28        "LICENSE",
29    ],
30}
31
32cc_library_headers {
33    name: "libruy_headers",
34    export_include_dirs: ["."],
35    host_supported: true,
36    vendor_available: true,
37    sdk_version: "current",
38}
39
40cc_defaults {
41    name: "libruy_defaults",
42    host_supported: true,
43    vendor_available: true,
44    srcs: [
45        "ruy/allocator.cc",
46        "ruy/apply_multiplier.cc",
47        "ruy/block_map.cc",
48        "ruy/blocking_counter.cc",
49        "ruy/context.cc",
50        "ruy/context_get_ctx.cc",
51        "ruy/cpuinfo.cc",
52        "ruy/ctx.cc",
53        "ruy/denormal.cc",
54        "ruy/frontend.cc",
55        "ruy/have_built_path_for_avx.cc",
56        "ruy/have_built_path_for_avx2_fma.cc",
57        "ruy/have_built_path_for_avx512.cc",
58        "ruy/kernel_arm32.cc",
59        "ruy/kernel_arm64.cc",
60        "ruy/kernel_avx.cc",
61        "ruy/kernel_avx2_fma.cc",
62        "ruy/kernel_avx512.cc",
63        "ruy/pack_arm.cc",
64        "ruy/pack_avx.cc",
65        "ruy/pack_avx2_fma.cc",
66        "ruy/pack_avx512.cc",
67        "ruy/prepacked_cache.cc",
68        "ruy/prepare_packed_matrices.cc",
69        "ruy/system_aligned_alloc.cc",
70        "ruy/thread_pool.cc",
71        "ruy/trmul.cc",
72        "ruy/tune.cc",
73        "ruy/wait.cc",
74    ],
75    cflags: [
76        "-Wno-inline-asm",
77    ],
78    export_include_dirs: ["."],
79}
80
81cc_library_shared {
82    name: "libruy",
83    defaults: ["libruy_defaults"],
84    double_loadable: true,
85}
86
87cc_library_static {
88    name: "libruy_static",
89    defaults: ["libruy_defaults"],
90    sdk_version: "current",
91    stl: "libc++_static",
92    apex_available: [
93        "//apex_available:platform",
94        "com.android.extservices",
95        "com.android.neuralnetworks",
96        "com.android.adservices",
97        "com.android.ondevicepersonalization",
98    ],
99    min_sdk_version: "30",
100}
101