1cc_library_shared { 2 name: "libRSCpuRef", 3 defaults: ["libbcc-targets"], 4 vendor_available: true, 5 native_bridge_supported: true, 6 vndk: { 7 enabled: true, 8 support_system_process: true, 9 }, 10 11 srcs: [ 12 "rsCpuCore.cpp", 13 "rsCpuExecutable.cpp", 14 "rsCpuScript.cpp", 15 "rsCpuRuntimeMath.cpp", 16 "rsCpuScriptGroup.cpp", 17 "rsCpuScriptGroup2.cpp", 18 "rsCpuIntrinsic.cpp", 19 "rsCpuIntrinsic3DLUT.cpp", 20 "rsCpuIntrinsicBLAS.cpp", 21 "rsCpuIntrinsicBlend.cpp", 22 "rsCpuIntrinsicBlur.cpp", 23 "rsCpuIntrinsicColorMatrix.cpp", 24 "rsCpuIntrinsicConvolve3x3.cpp", 25 "rsCpuIntrinsicConvolve5x5.cpp", 26 "rsCpuIntrinsicHistogram.cpp", 27 "rsCpuIntrinsicResize.cpp", 28 "rsCpuIntrinsicLUT.cpp", 29 "rsCpuIntrinsicYuvToRGB.cpp", 30 ], 31 32 arch: { 33 arm64: { 34 cflags: [ 35 "-DARCH_ARM_USE_INTRINSICS", 36 "-DARCH_ARM64_USE_INTRINSICS", 37 "-DARCH_ARM64_HAVE_NEON", 38 ], 39 40 srcs: [ 41 "rsCpuIntrinsics_advsimd_3DLUT.S", 42 "rsCpuIntrinsics_advsimd_Convolve.S", 43 "rsCpuIntrinsics_advsimd_Blur.S", 44 "rsCpuIntrinsics_advsimd_ColorMatrix.S", 45 "rsCpuIntrinsics_advsimd_Resize.S", 46 "rsCpuIntrinsics_advsimd_YuvToRGB.S", 47 "rsCpuIntrinsics_advsimd_Blend.S", 48 ], 49 }, 50 51 arm: { 52 cflags: [ 53 "-DARCH_ARM_HAVE_VFP", 54 "-DARCH_ARM_USE_INTRINSICS", 55 ], 56 57 srcs: [ 58 "rsCpuIntrinsics_neon_3DLUT.S", 59 "rsCpuIntrinsics_neon_Blend.S", 60 "rsCpuIntrinsics_neon_Blur.S", 61 "rsCpuIntrinsics_neon_Convolve.S", 62 "rsCpuIntrinsics_neon_ColorMatrix.S", 63 "rsCpuIntrinsics_neon_Resize.S", 64 "rsCpuIntrinsics_neon_YuvToRGB.S", 65 ], 66 67 asflags: ["-mfpu=neon"], 68 69 neon: { 70 cflags: [ 71 "-DARCH_ARM_HAVE_NEON", 72 ], 73 }, 74 }, 75 76 x86: { 77 cflags: ["-DARCH_X86_HAVE_SSSE3"], 78 srcs: ["rsCpuIntrinsics_x86.cpp"], 79 }, 80 x86_64: { 81 cflags: ["-DARCH_X86_HAVE_SSSE3"], 82 srcs: ["rsCpuIntrinsics_x86.cpp"], 83 avx2: { 84 cflags: ["-DARCH_X86_HAVE_AVX2", "-mavx2", "-mfma"], 85 }, 86 }, 87 }, 88 89 target: { 90 arm_on_x86: { 91 cflags: ["-DBUILD_ARM_FOR_X86"], 92 }, 93 }, 94 95 shared_libs: [ 96 "libRS_internal", 97 "libc++", 98 "liblog", 99 "libz", 100 101 "libbcinfo", 102 "libblas", 103 ], 104 static_libs: ["libbnnmlowp"], 105 header_libs: [ 106 "libutils_headers", 107 "libhardware_headers", 108 ], 109 110 include_dirs: [ 111 "frameworks/compile/libbcc/include", 112 "frameworks/rs", 113 ], 114 115 cflags: [ 116 "-Werror", 117 "-Wall", 118 "-Wextra", 119 "-Wno-unused-parameter", 120 "-Wno-unused-variable", 121 ], 122 123 product_variables: { 124 pdk: { 125 // Not building RenderScript modules in PDK builds, as libmediandk 126 // is not available in PDK. 127 enabled: false, 128 }, 129 }, 130} 131