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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
cc_defaults {
name: "arm-optimized-routines-defaults",
host_supported: true,
cflags: [
"-Werror",
"-Wno-unused-parameter",
"-O2",
"-ffp-contract=fast",
"-fno-math-errno",
// bionic configuration.
// We're actually implementing bionic here, so we don't want <math.h>
// to try to be helpful by renaming long double routines.
"-D__BIONIC_LP32_USE_LONG_DOUBLE",
"-DFLT_EVAL_METHOD=0",
// arm-optimized-routines configuration.
// BSD libm doesn't set errno, and bionic was based on the BSDs.
// https://github.com/ARM-software/optimized-routines/issues/16#issuecomment-572009659
"-DWANT_ERRNO=0",
// TODO: we may want the vector code in future, but it's not ready yet.
"-DWANT_VMATH=0",
],
local_include_dirs: ["math/include"],
}
cc_library {
name: "libarm-optimized-routines-math",
defaults: ["arm-optimized-routines-defaults"],
ramdisk_available: true,
recovery_available: true,
native_bridge_supported: true,
srcs: [
"math/*.c",
],
// arch-specific settings
arch: {
arm64: {
cflags: [
"-DHAVE_FAST_FMA=1",
],
},
},
target: {
darwin: {
enabled: false,
},
linux_bionic: {
enabled: true,
},
},
stl: "none",
static: {
system_shared_libs: [],
},
}
// adb shell "/data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/test/testcases/directed/*"
// adb shell "/data/nativetest/mathtest/mathtest /data/nativetest/mathtest/test/testcases/directed/*"
cc_test {
name: "mathtest",
defaults: ["arm-optimized-routines-defaults"],
gtest: false,
cflags: ["-Wno-missing-braces"],
srcs: ["math/test/mathtest.c"],
data: ["math/test/testcases/directed/*.tst"],
target: {
darwin: {
enabled: false,
},
linux_bionic: {
enabled: true,
},
},
}
cc_test {
name: "ulp",
defaults: ["arm-optimized-routines-defaults"],
gtest: false,
srcs: ["math/test/ulp.c"],
data: ["math/test/runulp.sh"],
}
sh_test {
name: "arm-optimized-routines-tests",
src: "run-arm-optimized-routines-tests-on-android.sh",
filename: "run-arm-optimized-routines-tests-on-android.sh",
test_suites: ["general-tests"],
host_supported: true,
device_supported: false,
test_config: "arm-optimized-routines-tests.xml",
target_required: [
"mathtest",
"ulp",
],
}
|