1cc_defaults { 2 name: "arm-optimized-routines-defaults", 3 host_supported: true, 4 cflags: [ 5 "-Werror", 6 "-Wno-unused-parameter", 7 "-O2", 8 "-ffp-contract=fast", 9 "-fno-math-errno", 10 11 // bionic configuration. 12 13 // We're actually implementing bionic here, so we don't want <math.h> 14 // to try to be helpful by renaming long double routines. 15 "-D__BIONIC_LP32_USE_LONG_DOUBLE", 16 "-DFLT_EVAL_METHOD=0", 17 18 // arm-optimized-routines configuration. 19 20 // BSD libm doesn't set errno, and bionic was based on the BSDs. 21 // https://github.com/ARM-software/optimized-routines/issues/16#issuecomment-572009659 22 "-DWANT_ERRNO=0", 23 // TODO: we may want the vector code in future, but it's not ready yet. 24 "-DWANT_VMATH=0", 25 ], 26 local_include_dirs: ["math/include"], 27} 28 29cc_library { 30 name: "libarm-optimized-routines-math", 31 defaults: ["arm-optimized-routines-defaults"], 32 ramdisk_available: true, 33 recovery_available: true, 34 native_bridge_supported: true, 35 srcs: [ 36 "math/*.c", 37 ], 38 39 // arch-specific settings 40 arch: { 41 arm64: { 42 cflags: [ 43 "-DHAVE_FAST_FMA=1", 44 ], 45 }, 46 }, 47 48 target: { 49 darwin: { 50 enabled: false, 51 }, 52 linux_bionic: { 53 enabled: true, 54 }, 55 }, 56 stl: "none", 57 static: { 58 system_shared_libs: [], 59 }, 60} 61 62// adb shell "/data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/test/testcases/directed/*" 63// adb shell "/data/nativetest/mathtest/mathtest /data/nativetest/mathtest/test/testcases/directed/*" 64cc_test { 65 name: "mathtest", 66 defaults: ["arm-optimized-routines-defaults"], 67 gtest: false, 68 cflags: ["-Wno-missing-braces"], 69 srcs: ["math/test/mathtest.c"], 70 data: ["math/test/testcases/directed/*.tst"], 71 target: { 72 darwin: { 73 enabled: false, 74 }, 75 linux_bionic: { 76 enabled: true, 77 }, 78 }, 79} 80 81cc_test { 82 name: "ulp", 83 defaults: ["arm-optimized-routines-defaults"], 84 gtest: false, 85 srcs: ["math/test/ulp.c"], 86 data: ["math/test/runulp.sh"], 87} 88 89sh_test { 90 name: "arm-optimized-routines-tests", 91 src: "run-arm-optimized-routines-tests-on-android.sh", 92 filename: "run-arm-optimized-routines-tests-on-android.sh", 93 test_suites: ["general-tests"], 94 host_supported: true, 95 device_supported: false, 96 test_config: "arm-optimized-routines-tests.xml", 97 target_required: [ 98 "mathtest", 99 "ulp", 100 ], 101} 102