From 2ed17d4bc69835e1b4cbe3f9e84c6f6bdf438df0 Mon Sep 17 00:00:00 2001 From: Lingfeng Yang Date: Thu, 27 Sep 2018 08:04:08 -0700 Subject: Enable host build for gralloc bug: 116712605 - No libdl needed on host - Define PAGE_SIZE - Include gralloc in build + Consolidate a few build script conditionals in egl Android.mk + Remove unused Callstack.h Change-Id: I2e5f8050971d41e7ae26910ce6bd43dad114e5c5 --- Android.mk | 4 +++- system/egl/Android.mk | 9 ++++++--- system/gralloc/Android.mk | 2 ++ system/gralloc/gralloc.cpp | 1 - 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Android.mk b/Android.mk index 0c8748e8..97452fe6 100644 --- a/Android.mk +++ b/Android.mk @@ -57,6 +57,7 @@ EMUGL_COMMON_CFLAGS += \ -DANDROID \ -DGL_GLEXT_PROTOTYPES \ -fvisibility=default \ + -DPAGE_SIZE=4096 \ endif # GOLDFISH_OPENGL_BUILD_FOR_HOST @@ -136,9 +137,10 @@ include $(GOLDFISH_OPENGL_PATH)/system/OpenglSystemCommon/Android.mk include $(GOLDFISH_OPENGL_PATH)/system/GLESv1/Android.mk include $(GOLDFISH_OPENGL_PATH)/system/GLESv2/Android.mk +include $(GOLDFISH_OPENGL_PATH)/system/gralloc/Android.mk + ifneq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST)) -include $(GOLDFISH_OPENGL_PATH)/system/gralloc/Android.mk include $(GOLDFISH_OPENGL_PATH)/system/egl/Android.mk endif # !GOLDFISH_OPENGL_BUILD_FOR_HOST diff --git a/system/egl/Android.mk b/system/egl/Android.mk index 9864e131..eab1c9ca 100644 --- a/system/egl/Android.mk +++ b/system/egl/Android.mk @@ -13,16 +13,17 @@ LOCAL_SRC_FILES := \ egl.cpp \ ClientAPIExts.cpp -ifdef IS_AT_LEAST_OPD1 -LOCAL_SHARED_LIBRARIES += libdl libnativewindow -else +ifneq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST)) + LOCAL_SHARED_LIBRARIES += libdl endif ifdef IS_AT_LEAST_OPD1 +LOCAL_SHARED_LIBRARIES += libnativewindow LOCAL_STATIC_LIBRARIES += libarect endif +ifneq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST)) ifdef IS_AT_LEAST_OPM1 LOCAL_HEADER_LIBRARIES += libui_headers endif @@ -34,6 +35,8 @@ endif # Used to access the Bionic private OpenGL TLS slot LOCAL_C_INCLUDES += bionic/libc/private +endif # !GOLDFISH_OPENGL_BUILD_FOR_HOST + $(call emugl-end-module) #### egl.cfg #### diff --git a/system/gralloc/Android.mk b/system/gralloc/Android.mk index 190bfd63..88dd1933 100644 --- a/system/gralloc/Android.mk +++ b/system/gralloc/Android.mk @@ -12,9 +12,11 @@ LOCAL_CFLAGS += -Wno-missing-field-initializers LOCAL_SRC_FILES := gralloc.cpp +ifneq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST)) # Need to access the special OPENGL TLS Slot LOCAL_C_INCLUDES += bionic/libc/private LOCAL_SHARED_LIBRARIES += libdl +endif $$(call emugl-end-module) endef # define gralloc_recipe diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp index 0c1b8350..4f610c0c 100644 --- a/system/gralloc/gralloc.cpp +++ b/system/gralloc/gralloc.cpp @@ -34,7 +34,6 @@ #include "ProcessPipe.h" #include "ThreadInfo.h" #include "glUtils.h" -#include #include #include -- cgit v1.2.3