Link sigchain to surfaceflinger main executable
And export necessary symbols to preempt calls from libart.so
Bug: 15345057
Bug: 15426766
(cherry picked from commit f3da24d8cf02d7c74ff7c24eae0154a21a192fda)
Change-Id: I03b632e0bf2cbaf4a0e68cd0af4e991f7f6b08e4
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 183478d..57e94ef 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -108,17 +108,24 @@
# build surfaceflinger's executable
include $(CLEAR_VARS)
-LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
+LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
+LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" -Iart
+LOCAL_CPPFLAGS:= -std=c++11
+# TODO: Trying to link libsigchain as a static library prevents
+# static linker from exporting necessary symbols. So as a workaround
+# we use sigchain.o
LOCAL_SRC_FILES:= \
- main_surfaceflinger.cpp
+ main_surfaceflinger.cpp \
+ sigchain_proxy.cpp
LOCAL_SHARED_LIBRARIES := \
libsurfaceflinger \
libcutils \
liblog \
libbinder \
- libutils
+ libutils \
+ libdl
LOCAL_MODULE:= surfaceflinger