From f4fd7b22141161f82619c62d56f6775aea622959 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Thu, 8 Mar 2018 16:20:08 +0900 Subject: Fix link-type warning on GLPerf An sdk app GLPerf uses a native:platform library libglperf, which causes a link-type warning. Actually libutils is the only platform library used by libglperf, and the warning can be eliminated by rewriting code not to use libutils and setting LOCAL_SDK_VERSION. Bug: 73907534 Test: mma -j does not show any link-type warnings Change-Id: I9ad9b542288e6dd914f14ec45d8d35c6985da89f --- opengl/tests/gl_perfapp/Android.mk | 3 ++- opengl/tests/gl_perfapp/jni/gl_code.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/opengl/tests/gl_perfapp/Android.mk b/opengl/tests/gl_perfapp/Android.mk index 854b54ff9e..3f411ea962 100644 --- a/opengl/tests/gl_perfapp/Android.mk +++ b/opengl/tests/gl_perfapp/Android.mk @@ -39,11 +39,12 @@ LOCAL_SRC_FILES:= \ gl_code.cpp LOCAL_SHARED_LIBRARIES := \ - libutils \ liblog \ libEGL \ libGLESv2 +LOCAL_SDK_VERSION := current + LOCAL_MODULE := libglperf diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp index 0cb594a0b0..bd1fd83184 100644 --- a/opengl/tests/gl_perfapp/jni/gl_code.cpp +++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp @@ -2,16 +2,21 @@ #include #define LOG_TAG "GLPerf gl_code.cpp" -#include +#include + +#define ALOG(priority, tag, ...) ((void)__android_log_print(ANDROID_##priority, tag, __VA_ARGS__)) + +#define ALOGI(...) ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__) +#define ALOGE(...) ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__) #include #include #include -#include #include #include #include +#include #include "../../gl_perf/fill_common.cpp" -- cgit v1.2.3-59-g8ed1b