blob: 33b21ece877578452d0c5e51e2430fd7f41a1fd1 [file] [log] [blame]
Elliott Hughes3eae8e02019-12-18 14:17:17 -08001cc_defaults {
2 name: "arm-optimized-routines-defaults",
Elliott Hughesc2e01832018-07-20 13:55:44 -07003 host_supported: true,
4 cflags: [
5 "-Werror",
Elliott Hughes7504fa92019-10-16 11:00:15 -07006 "-Wno-unused-parameter",
Elliott Hughesc2e01832018-07-20 13:55:44 -07007 "-O2",
Elliott Hughes055b2f32019-09-17 13:05:56 -07008 // We're actually implementing bionic here, so we don't want <math.h>
9 // to try to be helpful by renaming long double routines.
10 "-D__BIONIC_LP32_USE_LONG_DOUBLE",
Elliott Hughesc2e01832018-07-20 13:55:44 -070011 "-DWANT_ROUNDING=0",
12 "-DWANT_ERRNO=0",
Elliott Hughes3eae8e02019-12-18 14:17:17 -080013 "-DWANT_VMATH=0",
Adhemerval Zanella9e6e8322018-07-26 11:43:46 -030014 "-DFLT_EVAL_METHOD=0",
15 "-ffp-contract=fast",
Elliott Hughes3eae8e02019-12-18 14:17:17 -080016 "-fno-math-errno",
Elliott Hughesc2e01832018-07-20 13:55:44 -070017 ],
Elliott Hughes3f885362019-10-15 09:04:39 -070018 local_include_dirs: ["math/include"],
Elliott Hughes3eae8e02019-12-18 14:17:17 -080019}
20
21cc_library {
Elliott Hughes54389862020-01-07 13:48:01 -080022 name: "libarm-optimized-routines-math",
Elliott Hughes3eae8e02019-12-18 14:17:17 -080023 defaults: ["arm-optimized-routines-defaults"],
24 recovery_available: true,
25 native_bridge_supported: true,
Elliott Hughesc2e01832018-07-20 13:55:44 -070026 srcs: [
Haibo Huangcd7d5362019-07-31 18:22:02 -070027 "math/*.c",
Elliott Hughesc2e01832018-07-20 13:55:44 -070028 ],
Adhemerval Zanella8e8d1b72018-08-06 13:22:58 -030029
30 // arch-specific settings
31 arch: {
32 arm64: {
33 cflags: [
34 "-DHAVE_FAST_FMA=1",
35 ],
36 },
37 },
38
Elliott Hughesc2e01832018-07-20 13:55:44 -070039 target: {
Christopher Ferris8785a762018-07-27 13:59:37 -070040 darwin: {
41 enabled: false,
42 },
Elliott Hughesc2e01832018-07-20 13:55:44 -070043 linux_bionic: {
44 enabled: true,
45 },
46 },
47 stl: "none",
Dan Willemsen35edf452018-12-03 13:56:24 -080048 static: {
49 system_shared_libs: [],
50 },
Elliott Hughesc2e01832018-07-20 13:55:44 -070051}
52
Elliott Hughese9c71052018-08-01 13:26:04 -070053// adb shell "/data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/test/testcases/directed/*"
54// adb shell "/data/nativetest/mathtest/mathtest /data/nativetest/mathtest/test/testcases/directed/*"
Elliott Hughesc2e01832018-07-20 13:55:44 -070055cc_test {
56 name: "mathtest",
Elliott Hughes3eae8e02019-12-18 14:17:17 -080057 defaults: ["arm-optimized-routines-defaults"],
Elliott Hughesc2e01832018-07-20 13:55:44 -070058 gtest: false,
Elliott Hughes3eae8e02019-12-18 14:17:17 -080059 cflags: ["-Wno-missing-braces"],
60 srcs: ["math/test/mathtest.c"],
Haibo Huangcd7d5362019-07-31 18:22:02 -070061 data: ["math/test/testcases/directed/*.tst"],
Elliott Hughesc2e01832018-07-20 13:55:44 -070062 target: {
Elliott Hughese3966aa2018-07-26 08:46:15 -070063 darwin: {
64 enabled: false,
65 },
Elliott Hughesc2e01832018-07-20 13:55:44 -070066 linux_bionic: {
67 enabled: true,
68 },
69 },
70}
Elliott Hughes3eae8e02019-12-18 14:17:17 -080071
72cc_test {
73 name: "ulp",
74 defaults: ["arm-optimized-routines-defaults"],
75 gtest: false,
76 srcs: ["math/test/ulp.c"],
77 data: ["math/test/runulp.sh"],
78}
79
80sh_test {
81 name: "arm-optimized-routines-tests",
82 src: "run-arm-optimized-routines-tests-on-android.sh",
83 filename: "run-arm-optimized-routines-tests-on-android.sh",
84 test_suites: ["general-tests"],
85 host_supported: true,
86 device_supported: false,
87 test_config: "arm-optimized-routines-tests.xml",
88 target_required: [
89 "mathtest",
90 "ulp",
91 ],
92}