2017-08-24 22:02 GMT+08:00 Rob Herring <r...@kernel.org>: > On Thu, Aug 24, 2017 at 4:08 AM, Chih-Wei Huang <cwhu...@android-x86.org> > wrote: >> 2017-08-24 1:25 GMT+08:00 Rob Herring <r...@kernel.org>: >> >> I'm also trying to fix it. >> Seems it only requires the headers instead >> of the shared library. Adding libnativewindow to >> LOCAL_SHARED_LIBRARIES would add the >> unnecessary dependency to libGLES_mesa.so. > > Then the correct way to do this is LOCAL_HEADER_LIBRARIES instead.
Right. Unfortunately these two libs don't define cc_library_headers in their Android.bp so we can't use it. >> Locally I fixed it in this way: >> >> diff --git a/src/egl/Android.mk b/src/egl/Android.mk >> index 4ccbb9b..9e96aca 100644 >> --- a/src/egl/Android.mk >> +++ b/src/egl/Android.mk >> @@ -43,6 +43,8 @@ LOCAL_CFLAGS := \ >> -D_EGL_BUILT_IN_DRIVER_DRI2 >> >> LOCAL_C_INCLUDES := \ >> + frameworks/native/libs/arect/include \ >> + frameworks/native/libs/nativewindow/include \ > > Doing external includes this way is exactly what we don't want to do. > There's a defined way to do cross project headers. Agree. But better than add extra unnecessary dependency IMO. Fortunately we have a much better solution as suggested by Emil. I just tested it and it works as expected. Since it only needs the name ANativeWindow, forward declaration fits the purpose perfectly. -- Chih-Wei Android-x86 project http://www.android-x86.org _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev