123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- cc_defaults {
- name: "rs_support_defaults",
- product_variables: {
- unbundled_build: {
- // Unbundled builds use prebuilts in prebuilts/sdk/renderscript instead
- enabled: false,
- },
- },
- }
- // Generate custom headers
- gensrcs {
- name: "rs_generated_headers_support",
- tools: ["rsg-generator"],
- tool_files: [
- "rs.spec",
- "rs_compat.spec",
- ],
- cmd: "cat $(location rs.spec) $(location rs_compat.spec) | $(location rsg-generator) $(in) $(out)",
- output_extension: "h",
- srcs: [
- "rsgApiStructs.h_rsg",
- "rsgApiFuncDecl.h_rsg",
- ],
- export_include_dirs: ["."],
- }
- gensrcs {
- name: "rs_generated_sources_support",
- tools: ["rsg-generator"],
- tool_files: [
- "rs.spec",
- "rs_compat.spec",
- ],
- cmd: "cat $(location rs.spec) $(location rs_compat.spec) | $(location rsg-generator) $(in) $(out)",
- output_extension: "cpp",
- srcs: [
- "rsgApi.cpp_rsg",
- "rsgApiReplay.cpp_rsg",
- ],
- }
- cc_library_shared {
- name: "libRSSupport",
- defaults: ["rs_support_defaults"],
- sdk_version: "9",
- srcs: [
- "rsAllocation.cpp",
- "rsApiAllocation.cpp",
- "rsApiContext.cpp",
- "rsApiDevice.cpp",
- "rsApiElement.cpp",
- "rsApiType.cpp",
- "rsClosure.cpp",
- "rsComponent.cpp",
- "rsContext.cpp",
- "rsCppUtils.cpp",
- "rsDevice.cpp",
- "rsDriverLoader.cpp",
- "rsElement.cpp",
- "rsFifoSocket.cpp",
- "rsObjectBase.cpp",
- "rsMatrix2x2.cpp",
- "rsMatrix3x3.cpp",
- "rsMatrix4x4.cpp",
- "rsMutex.cpp",
- "rsSampler.cpp",
- "rsScript.cpp",
- "rsScriptC.cpp",
- "rsScriptC_Lib.cpp",
- "rsScriptGroup.cpp",
- "rsScriptGroup2.cpp",
- "rsScriptIntrinsic.cpp",
- "rsSignal.cpp",
- "rsStream.cpp",
- "rsThreadIO.cpp",
- "rsType.cpp",
- "driver/rsdAllocation.cpp",
- "driver/rsdBcc.cpp",
- "driver/rsdCore.cpp",
- "driver/rsdElement.cpp",
- "driver/rsdRuntimeStubs.cpp",
- "driver/rsdSampler.cpp",
- "driver/rsdScriptGroup.cpp",
- "driver/rsdType.cpp",
- "cpu_ref/rsCpuCore.cpp",
- "cpu_ref/rsCpuExecutable.cpp",
- "cpu_ref/rsCpuScript.cpp",
- "cpu_ref/rsCpuRuntimeMath.cpp",
- "cpu_ref/rsCpuScriptGroup.cpp",
- "cpu_ref/rsCpuScriptGroup2.cpp",
- "cpu_ref/rsCpuIntrinsic.cpp",
- "cpu_ref/rsCpuIntrinsic3DLUT.cpp",
- "cpu_ref/rsCpuIntrinsicBlend.cpp",
- "cpu_ref/rsCpuIntrinsicBlur.cpp",
- "cpu_ref/rsCpuIntrinsicBLAS.cpp",
- "cpu_ref/rsCpuIntrinsicColorMatrix.cpp",
- "cpu_ref/rsCpuIntrinsicConvolve3x3.cpp",
- "cpu_ref/rsCpuIntrinsicConvolve5x5.cpp",
- "cpu_ref/rsCpuIntrinsicHistogram.cpp",
- "cpu_ref/rsCpuIntrinsicLUT.cpp",
- "cpu_ref/rsCpuIntrinsicResize.cpp",
- "cpu_ref/rsCpuIntrinsicYuvToRGB.cpp",
- ],
- generated_sources: ["rs_generated_sources_support"],
- generated_headers: ["rs_generated_headers_support"],
- arch: {
- arm: {
- cflags: [
- "-DARCH_ARM_HAVE_VFP",
- "-DARCH_ARM_USE_INTRINSICS",
- ],
- asflags: ["-mfpu=neon"],
- srcs: [
- "cpu_ref/rsCpuIntrinsics_neon_3DLUT.S",
- "cpu_ref/rsCpuIntrinsics_neon_Blend.S",
- "cpu_ref/rsCpuIntrinsics_neon_Blur.S",
- "cpu_ref/rsCpuIntrinsics_neon_ColorMatrix.S",
- "cpu_ref/rsCpuIntrinsics_neon_Convolve.S",
- "cpu_ref/rsCpuIntrinsics_neon_Resize.S",
- "cpu_ref/rsCpuIntrinsics_neon_YuvToRGB.S",
- ],
- neon: {
- cflags: ["-DARCH_ARM_HAVE_NEON"]
- },
- },
- arm64: {
- cflags: [
- "-DARCH_ARM_USE_INTRINSICS",
- "-DARCH_ARM64_USE_INTRINSICS",
- "-DARCH_ARM64_HAVE_NEON",
- ],
- srcs: [
- "cpu_ref/rsCpuIntrinsics_advsimd_3DLUT.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_Blend.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_Blur.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_ColorMatrix.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_Convolve.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_Resize.S",
- "cpu_ref/rsCpuIntrinsics_advsimd_YuvToRGB.S",
- ],
- },
- x86: {
- cflags: ["-DARCH_X86_HAVE_SSSE3"],
- srcs: ["cpu_ref/rsCpuIntrinsics_x86.cpp"],
- },
- x86_64: {
- cflags: ["-DARCH_X86_HAVE_SSSE3"],
- srcs: ["cpu_ref/rsCpuIntrinsics_x86.cpp"],
- },
- },
- required: ["libblasV8"],
- static_libs: ["libbnnmlowpV8"],
- shared_libs: [
- "liblog",
- "libdl",
- ],
- ldflags: [
- "-Wl,--exclude-libs,libc++_static.a",
- "-Wl,--hash-style=sysv",
- ],
- stl: "c++_static",
- cflags: [
- "-Werror",
- "-Wall",
- "-Wextra",
- "-Wno-unused-parameter",
- "-Wno-unused-variable",
- "-Wno-overloaded-virtual",
- "-DRS_COMPATIBILITY_LIB",
- "-DGEMMLOWP_USE_STLPORT",
- // TODO: why isn't this picked up from the host GLOBAL_CFLAGS?
- "-D__STDC_FORMAT_MACROS",
- // Allow implicit fallthrough in rsContext.cpp:414 until it is fixed.
- "-Wno-error=implicit-fallthrough",
- ],
- }
|