summaryrefslogtreecommitdiff
path: root/cpu_ref
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-05-04 18:33:10 -0700
committerColin Cross <ccross@android.com>2017-05-18 15:27:52 -0700
commit403885ee92f5dbcc1791e0c9a2834222cf69eb60 (patch)
treed62ff687bcb15ad3869d46734693fffe9de6a8c1 /cpu_ref
parent4308a5bb47ab75ee7d4f2e66b507e9908d58799b (diff)
downloadrs-403885ee92f5dbcc1791e0c9a2834222cf69eb60.tar.gz
Convert more of libRS* to Android.bp
See build/soong/README.md for more information. This reapplies If935ce5cc04da7801210acb49f0a9ed15fcf5889 with the support modules disabled for unbundled builds to avoid conflicts with the prebuilts in prebuilts/sdk/renderscript. Also moves OVERRIDE_RS_DRIVER to be set for libRS_internal. Test: m -j checkbuild Change-Id: If935ce5cc04da7801210acb49f0a9ed15fcf5889 Merged-In: Ia98501a471ef5f090446c9fbe2dd1d3422021a6f (cherry picked from commit e5b2262c7337d13cdfd6852614c1743c19381164)
Diffstat (limited to 'cpu_ref')
-rw-r--r--cpu_ref/Android.bp121
-rw-r--r--cpu_ref/Android.mk103
2 files changed, 121 insertions, 103 deletions
diff --git a/cpu_ref/Android.bp b/cpu_ref/Android.bp
new file mode 100644
index 00000000..84b2b0b7
--- /dev/null
+++ b/cpu_ref/Android.bp
@@ -0,0 +1,121 @@
+cc_library_shared {
+ name: "libRSCpuRef",
+ defaults: ["libbcc-targets"],
+
+ srcs: [
+ "rsCpuCore.cpp",
+ "rsCpuExecutable.cpp",
+ "rsCpuScript.cpp",
+ "rsCpuRuntimeMath.cpp",
+ "rsCpuScriptGroup.cpp",
+ "rsCpuScriptGroup2.cpp",
+ "rsCpuIntrinsic.cpp",
+ "rsCpuIntrinsic3DLUT.cpp",
+ "rsCpuIntrinsicBLAS.cpp",
+ "rsCpuIntrinsicBlend.cpp",
+ "rsCpuIntrinsicBlur.cpp",
+ "rsCpuIntrinsicColorMatrix.cpp",
+ "rsCpuIntrinsicConvolve3x3.cpp",
+ "rsCpuIntrinsicConvolve5x5.cpp",
+ "rsCpuIntrinsicHistogram.cpp",
+ "rsCpuIntrinsicResize.cpp",
+ "rsCpuIntrinsicLUT.cpp",
+ "rsCpuIntrinsicYuvToRGB.cpp",
+ ],
+
+ arch: {
+ arm64: {
+ cflags: [
+ "-DARCH_ARM_USE_INTRINSICS",
+ "-DARCH_ARM64_USE_INTRINSICS",
+ "-DARCH_ARM64_HAVE_NEON",
+ ],
+
+ srcs: [
+ "rsCpuIntrinsics_advsimd_3DLUT.S",
+ "rsCpuIntrinsics_advsimd_Convolve.S",
+ "rsCpuIntrinsics_advsimd_Blur.S",
+ "rsCpuIntrinsics_advsimd_ColorMatrix.S",
+ "rsCpuIntrinsics_advsimd_Resize.S",
+ "rsCpuIntrinsics_advsimd_YuvToRGB.S",
+ "rsCpuIntrinsics_advsimd_Blend.S",
+ ],
+ },
+
+ arm: {
+ cflags: [
+ "-DARCH_ARM_HAVE_VFP",
+ "-DARCH_ARM_USE_INTRINSICS",
+ ],
+
+ srcs: [
+ "rsCpuIntrinsics_neon_3DLUT.S",
+ "rsCpuIntrinsics_neon_Blend.S",
+ "rsCpuIntrinsics_neon_Blur.S",
+ "rsCpuIntrinsics_neon_Convolve.S",
+ "rsCpuIntrinsics_neon_ColorMatrix.S",
+ "rsCpuIntrinsics_neon_Resize.S",
+ "rsCpuIntrinsics_neon_YuvToRGB.S",
+ ],
+
+ asflags: ["-mfpu=neon"],
+
+ neon: {
+ cflags: [
+ "-DARCH_ARM_HAVE_NEON",
+ ],
+ },
+ },
+
+ x86: {
+ ssse3: {
+ cflags: ["-DARCH_X86_HAVE_SSSE3"],
+ srcs: ["rsCpuIntrinsics_x86.cpp"],
+ },
+ },
+ x86_64: {
+ ssse3: {
+ cflags: ["-DARCH_X86_HAVE_SSSE3"],
+ srcs: ["rsCpuIntrinsics_x86.cpp"],
+ },
+ },
+ },
+
+ target: {
+ arm_on_x86: {
+ cflags: ["-DBUILD_ARM_FOR_X86"],
+ },
+ },
+
+ shared_libs: [
+ "libRS_internal",
+ "libc++",
+ "liblog",
+ "libz",
+
+ "libbcinfo",
+ "libblas",
+ ],
+ static_libs: ["libbnnmlowp"],
+
+ include_dirs: [
+ "frameworks/compile/libbcc/include",
+ "frameworks/rs",
+ ],
+
+ cflags: [
+ "-Werror",
+ "-Wall",
+ "-Wextra",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ ],
+
+ product_variables: {
+ pdk: {
+ // Not building RenderScript modules in PDK builds, as libmediandk
+ // is not available in PDK.
+ enabled: false,
+ },
+ },
+}
diff --git a/cpu_ref/Android.mk b/cpu_ref/Android.mk
deleted file mode 100644
index 9b3e9d3b..00000000
--- a/cpu_ref/Android.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-LOCAL_PATH:=$(call my-dir)
-
-# Not building RenderScript modules in PDK builds, as libmediandk
-# is not available in PDK.
-ifneq ($(TARGET_BUILD_PDK), true)
-
-rs_base_CFLAGS := -Werror -Wall -Wextra \
- -Wno-unused-parameter -Wno-unused-variable \
- -std=c++11
-
-ifneq ($(OVERRIDE_RS_DRIVER),)
- rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER)
-endif
-
-ifeq ($(BUILD_ARM_FOR_X86),true)
- rs_base_CFLAGS += -DBUILD_ARM_FOR_X86
-endif
-
-include $(CLEAR_VARS)
-ifneq ($(HOST_OS),windows)
-endif
-LOCAL_MODULE := libRSCpuRef
-LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64
-
-LOCAL_SRC_FILES:= \
- rsCpuCore.cpp \
- rsCpuExecutable.cpp \
- rsCpuScript.cpp \
- rsCpuRuntimeMath.cpp \
- rsCpuScriptGroup.cpp \
- rsCpuScriptGroup2.cpp \
- rsCpuIntrinsic.cpp \
- rsCpuIntrinsic3DLUT.cpp \
- rsCpuIntrinsicBLAS.cpp \
- rsCpuIntrinsicBlend.cpp \
- rsCpuIntrinsicBlur.cpp \
- rsCpuIntrinsicColorMatrix.cpp \
- rsCpuIntrinsicConvolve3x3.cpp \
- rsCpuIntrinsicConvolve5x5.cpp \
- rsCpuIntrinsicHistogram.cpp \
- rsCpuIntrinsicResize.cpp \
- rsCpuIntrinsicLUT.cpp \
- rsCpuIntrinsicYuvToRGB.cpp
-
-LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
-
-ifeq ($(RS_DISABLE_A53_WORKAROUND),true)
-LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND
-endif
-
-LOCAL_SRC_FILES_arm64 += \
- rsCpuIntrinsics_advsimd_3DLUT.S \
- rsCpuIntrinsics_advsimd_Convolve.S \
- rsCpuIntrinsics_advsimd_Blur.S \
- rsCpuIntrinsics_advsimd_ColorMatrix.S \
- rsCpuIntrinsics_advsimd_Resize.S \
- rsCpuIntrinsics_advsimd_YuvToRGB.S \
- rsCpuIntrinsics_advsimd_Blend.S
-
-ifeq ($(ARCH_ARM_HAVE_NEON),true)
- LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
-endif
-
-ifeq ($(ARCH_ARM_HAVE_VFP),true)
- LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
- LOCAL_SRC_FILES_arm += \
- rsCpuIntrinsics_neon_3DLUT.S \
- rsCpuIntrinsics_neon_Blend.S \
- rsCpuIntrinsics_neon_Blur.S \
- rsCpuIntrinsics_neon_Convolve.S \
- rsCpuIntrinsics_neon_ColorMatrix.S \
- rsCpuIntrinsics_neon_Resize.S \
- rsCpuIntrinsics_neon_YuvToRGB.S \
-
- LOCAL_ASFLAGS_arm := -mfpu=neon
-endif
-
-ifeq ($(ARCH_X86_HAVE_SSSE3),true)
- LOCAL_CFLAGS_x86 += -DARCH_X86_HAVE_SSSE3
- LOCAL_SRC_FILES_x86 += \
- rsCpuIntrinsics_x86.cpp
- LOCAL_CFLAGS_x86_64 += -DARCH_X86_HAVE_SSSE3
- LOCAL_SRC_FILES_x86_64 += \
- rsCpuIntrinsics_x86.cpp
-endif
-
-LOCAL_SHARED_LIBRARIES += libRS_internal libc++ liblog libz
-LOCAL_SHARED_LIBRARIES += libbcinfo libblas
-LOCAL_STATIC_LIBRARIES := libbnnmlowp
-
-LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
-LOCAL_C_INCLUDES += frameworks/rs
-LOCAL_C_INCLUDES += external/cblas/include
-LOCAL_C_INCLUDES += external/gemmlowp/eight_bit_int_gemm
-LOCAL_C_INCLUDES += external/zlib
-
-include frameworks/compile/libbcc/libbcc-targets.mk
-
-LOCAL_CFLAGS += $(rs_base_CFLAGS)
-
-include $(BUILD_SHARED_LIBRARY)
-
-endif # TARGET_BUILD_PDK