1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5// TODO: In later CLs, this build file will be replaced by a stand alone build that's not part of Android. 6 7cc_binary { 8 name: "renderscripttoolkittest", 9 srcs: [ 10 "TestTaskProcessor.cpp" 11 ], 12 shared_libs: [ 13 "libbase", 14 "librenderscripttoolkit", 15 ], 16} 17 18cc_library_shared { 19 name: "librenderscripttoolkit", 20 defaults: [], 21 vendor_available: false, 22 native_bridge_supported: false, 23 vndk: { 24 enabled: false, 25 support_system_process: false, 26 }, 27 28 srcs: [ 29 "Blend.cpp", 30 "Blur.cpp", 31 "ColorMatrix.cpp", 32 "Convolve3x3.cpp", 33 "Convolve5x5.cpp", 34 "Histogram.cpp", 35 "Lut.cpp", 36 "Lut3d.cpp", 37 "RenderScriptToolkit.cpp", 38 "Resize.cpp", 39 "TaskProcessor.cpp", 40 "Utils.cpp", 41 "YuvToRgb.cpp", 42 ], 43 44 static_libs: [ "cpufeatures" ], 45 46 arch: { 47 arm64: { 48 cflags: [ 49 "-DARCH_ARM_USE_INTRINSICS", 50 "-DARCH_ARM64_USE_INTRINSICS", 51 "-DARCH_ARM64_HAVE_NEON", 52 ], 53 54 srcs: [ 55 "Blend_advsimd.S", 56 "Blur_advsimd.S", 57 "ColorMatrix_advsimd.S", 58 "Convolve_advsimd.S", 59 "Lut3d_advsimd.S", 60 "Resize_advsimd.S", 61 "YuvToRgb_advsimd.S", 62 ], 63 }, 64 65 arm: { 66 cflags: [ 67 "-DARCH_ARM_HAVE_VFP", 68 "-DARCH_ARM_USE_INTRINSICS", 69 ], 70 71 srcs: [ 72 "Blend_neon.S", 73 "Blur_neon.S", 74 "ColorMatrix_neon.S", 75 "Convolve_neon.S", 76 "Lut3d_neon.S", 77 "Resize_neon.S", 78 "YuvToRgb_neon.S", 79 ], 80 81 asflags: ["-mfpu=neon"], 82 83 neon: { 84 cflags: [ 85 "-DARCH_ARM_HAVE_NEON", 86 ], 87 }, 88 }, 89 90 x86: { 91 cflags: ["-DARCH_X86_HAVE_SSSE3"], 92 srcs: ["x86.cpp"], 93 }, 94 x86_64: { 95 cflags: ["-DARCH_X86_HAVE_SSSE3"], 96 srcs: ["x86.cpp"], 97 avx2: { 98 cflags: ["-DARCH_X86_HAVE_AVX2", "-mavx2", "-mfma"], 99 }, 100 }, 101 }, 102 103 shared_libs: [ 104 "libbase", 105 "liblog", 106 "libnativehelper", 107 "libjnigraphics", 108 ], 109 header_libs: [ 110 // TODO Once we compile in the .cpp files, check if any of these libraries are needed. 111 //"libutils_headers", 112 //"libhardware_headers", 113 ], 114 115 include_dirs: [ 116 ], 117 118 cflags: [ 119 "-Wthread-safety", 120 "-Werror", 121 "-Wall", 122 "-Wextra", 123 "-Wno-unused-parameter", 124 "-Wno-unused-variable", 125 ], 126 127 // TODO: Is this needed? 128 product_variables: { 129 pdk: { 130 // Not building RenderScript modules in PDK builds, as libmediandk 131 // is not available in PDK. 132 enabled: false, 133 }, 134 }, 135} 136