diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-29 17:19:31 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-29 17:19:31 +0000 |
commit | 8444fc7befe0a54bf82b2866751b91325a4b0a10 (patch) | |
tree | bcc61ec9f378158331e6d7119860772cbfb992ec | |
parent | 2bfe69b0984e32d9d8ebb686a4ee2c49c1a9cf2f (diff) | |
parent | bd4f5d0cb29d431154adcb65b7448a71027055f7 (diff) | |
download | mesa3d-8444fc7befe0a54bf82b2866751b91325a4b0a10.tar.gz |
Convert libmesa_sse41 to Android.bp am: f75e3af689 am: 7437f9bddb am: bd4f5d0cb2
Change-Id: I356dc053f11236d868ed25a6702b690a09c46b1f
-rwxr-xr-x | aosp-gen-bp.sh | 30 | ||||
-rw-r--r-- | src/Android.bp | 13 | ||||
-rw-r--r-- | src/mesa/Android.bp | 31 | ||||
-rw-r--r-- | src/mesa/Android.libmesa_sse41.mk | 47 | ||||
-rw-r--r-- | src/mesa/Android.mk | 1 | ||||
-rw-r--r-- | src/mesa/Android.sources.bp | 9 |
6 files changed, 80 insertions, 51 deletions
diff --git a/aosp-gen-bp.sh b/aosp-gen-bp.sh index b27f4c67266..e00d73d553f 100755 --- a/aosp-gen-bp.sh +++ b/aosp-gen-bp.sh @@ -2,4 +2,32 @@ echo "// Autogenerated by aosp-gen-bp.sh" >Android.gen.bp echo 'cc_defaults { name: "mesa_version_defaults", cflags: ["-DPACKAGE_VERSION=\"'$(cat VERSION)'\""] }' >>Android.gen.bp -bpfmt -w Android.gen.bp
\ No newline at end of file +bpfmt -w Android.gen.bp + + +echo ' +nothing: + @true +include $(DIR)/Makefile.sources +comma := , +$(file >$(DIR)/Android.sources.bp,// Generated by aosp-gen-bp.sh) +$(foreach extract,$(EXTRACT),\ + $(eval kv := $(subst :, ,$(extract)))\ + $(eval fgname := $(word 1,$(kv)))\ + $(eval sym := $(word 2,$(kv)))\ + $(file >>$(DIR)/Android.sources.bp,filegroup{name:"$(fgname)",\ + visibility: [":__subpackages__"],\ + srcs:[$(foreach f,$(filter %.c,$($(sym))),"$(f)"$(comma))]})) + +output := $(shell bpfmt -w $(DIR)/Android.sources.bp 2>&1 || echo "Failed") +ifneq ($(output),) + $(error bpfmt returned: $(output)) +endif +' >android_extract.mk + +make -f android_extract.mk DIR=src/mesa \ + EXTRACT="\ + mesa_x86_sse41_srcs:X86_SSE41_FILES \ + " + +rm android_extract.mk diff --git a/src/Android.bp b/src/Android.bp index adbba2cea01..741022da520 100644 --- a/src/Android.bp +++ b/src/Android.bp @@ -17,4 +17,15 @@ cc_library_headers { host_supported: true, vendor: true, visibility: [":__subpackages__"], -}
\ No newline at end of file +} + +cc_library_headers { + name: "libmesa_sse41_includes", + export_include_dirs: [ + "mapi", + "gallium/include", + "gallium/auxiliary", + ], + vendor: true, + visibility: [":__subpackages__"], +} diff --git a/src/mesa/Android.bp b/src/mesa/Android.bp index 42dd41817b4..711254c48d2 100644 --- a/src/mesa/Android.bp +++ b/src/mesa/Android.bp @@ -20,6 +20,8 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +build = ["Android.sources.bp"] + // // The libmesa_glsl_utils libraries allow us to avoid a circular dependency // between core mesa and glsl. @@ -50,4 +52,31 @@ cc_binary_host { srcs: ["x86/gen_matypes.c"], header_libs: ["mesa_mapi_headers"], compile_multilib: "32", -}
\ No newline at end of file +} + +cc_library_static { + name: "libmesa_sse41", + defaults: ["mesa_common_defaults"], + + srcs: [":mesa_x86_sse41_srcs"], + + cflags: [ + "-msse4.1", + "-mstackrealign", + ], + header_libs: ["libmesa_sse41_includes"], + + enabled: false, + arch: { + x86: { + sse4_1: { + enabled: true, + }, + }, + x86_64: { + sse4_1: { + enabled: true, + }, + }, + }, +} diff --git a/src/mesa/Android.libmesa_sse41.mk b/src/mesa/Android.libmesa_sse41.mk deleted file mode 100644 index de19a1fb48b..00000000000 --- a/src/mesa/Android.libmesa_sse41.mk +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2012 Intel Corporation -# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> -# Copyright (C) 2010-2011 LunarG Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -ifeq ($(ARCH_X86_HAVE_SSE4_1),true) - -LOCAL_PATH := $(call my-dir) - -include $(LOCAL_PATH)/Makefile.sources - -include $(CLEAR_VARS) - -LOCAL_MODULE := libmesa_sse41 - -LOCAL_SRC_FILES += \ - $(X86_SSE41_FILES) - -LOCAL_CFLAGS := \ - -msse4.1 -mstackrealign - -LOCAL_C_INCLUDES := \ - $(MESA_TOP)/src/mapi \ - $(MESA_TOP)/src/gallium/include \ - $(MESA_TOP)/src/gallium/auxiliary - -include $(MESA_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) - -endif diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk index 0ff523e323a..138c5c5df7a 100644 --- a/src/mesa/Android.mk +++ b/src/mesa/Android.mk @@ -22,7 +22,6 @@ LOCAL_PATH := $(call my-dir) include $(LOCAL_PATH)/Android.libmesa_dricore.mk include $(LOCAL_PATH)/Android.libmesa_st_mesa.mk -include $(LOCAL_PATH)/Android.libmesa_sse41.mk include $(LOCAL_PATH)/Android.libmesa_git_sha1.mk include $(LOCAL_PATH)/program/Android.mk diff --git a/src/mesa/Android.sources.bp b/src/mesa/Android.sources.bp new file mode 100644 index 00000000000..0e3d255658d --- /dev/null +++ b/src/mesa/Android.sources.bp @@ -0,0 +1,9 @@ +// Generated by aosp-gen-bp.sh +filegroup { + name: "mesa_x86_sse41_srcs", + visibility: [":__subpackages__"], + srcs: [ + "main/streaming-load-memcpy.c", + "main/sse_minmax.c", + ], +} |