-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroid.bp
More file actions
84 lines (77 loc) · 2.1 KB
/
Android.bp
File metadata and controls
84 lines (77 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Copyright (C) 2026 The OpenIntelligenceRuntime Project
// Licensed under the Apache License, Version 2.0
//
// whisper.cpp static library for AOSP — v0.4 / OIR audio.transcribe.
// Upstream: https://github.com/ggml-org/whisper.cpp (v1.7.4)
// Pattern mirrors external/llama.cpp/Android.bp.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_library_static {
name: "libwhisper",
vendor_available: true,
product_available: true,
srcs: [
// ggml core
"src/ggml/src/ggml.c",
"src/ggml/src/ggml-alloc.c",
"src/ggml/src/ggml-backend.cpp",
"src/ggml/src/ggml-backend-reg.cpp",
"src/ggml/src/ggml-quants.c",
"src/ggml/src/ggml-threading.cpp",
"src/ggml/src/ggml-opt.cpp",
// ggml CPU backend
"src/ggml/src/ggml-cpu/ggml-cpu.cpp",
"src/ggml/src/ggml-cpu/ggml-cpu-quants.c",
"src/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
"src/ggml/src/ggml-cpu/ggml-cpu-traits.cpp",
"src/ggml/src/ggml-cpu/ggml-cpu-hbm.cpp",
// whisper core
"src/src/whisper.cpp",
],
export_include_dirs: [
"src/include",
"src/ggml/include",
],
local_include_dirs: [
"src/include",
"src/ggml/include",
"src/ggml/src",
"src/ggml/src/ggml-cpu",
"src/src",
],
cflags: [
"-DNDEBUG",
"-DGGML_USE_CPU",
"-D_GNU_SOURCE",
"-O3",
"-fPIC",
"-pthread",
"-Wall",
"-fexceptions",
"-frtti",
"-Wno-unused-parameter",
"-Wno-unused-function",
"-Wno-missing-field-initializers",
"-Wno-implicit-fallthrough",
"-Wno-unused-variable",
"-Wno-unused-but-set-variable",
],
arch: {
arm64: {
cflags: [
"-DGGML_USE_CPU_AARCH64",
],
},
x86_64: {
cflags: [
"-mavx2",
"-mfma",
"-mf16c",
],
srcs: [
"src/ggml/src/ggml-cpu/cpu-feats-x86.cpp",
],
},
},
}