With SANITIZE_TARGET, load EGL libs from the instrumented path.
Bug: 21785137
Change-Id: Iac56419a9ca776c5704bed44d3f0a1a1edd9d172
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 4da9f92..cc9b50c 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -59,6 +59,11 @@
LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
endif
+ifeq (address, $(strip $(SANITIZE_TARGET)))
+ LOCAL_CFLAGS_32 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib\"
+ LOCAL_CFLAGS_64 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib64\"
+endif
+
LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module)
egl.cfg_config_module :=