OSDN Git Service

FDO: do not support host modules
authorsynergydev <synergye@codefi.re>
Mon, 5 Aug 2013 09:44:37 +0000 (02:44 -0700)
committersynergydev <synergye@codefi.re>
Mon, 5 Aug 2013 09:44:37 +0000 (02:44 -0700)
Summary:
If built with BUILD_FDO_INSTRUMENT alone, host modules will fail at runtime (during build)
due to failing to create /data in most standard unix user permission cases. If the user does
have full permission to /, /data/profile/ will be created and profiles will be generated there.
Any file generation in the Android Build System should be kept to $OUT.

This commit fixes this bug.

Test Plan:
Build with BUILD_FDO_INSTRUMENT without additional configuration, and host modules will no longer generate profiles
at their runtime.

core/binary.mk

index 10d4927..3893d03 100644 (file)
@@ -115,9 +115,11 @@ endif
 ## Add FDO flags if FDO is turned on and supported
 ####################################################
 ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),)
-  LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
-  LOCAL_CPPFLAGS += $(TARGET_FDO_CFLAGS)
-  LOCAL_LDFLAGS += $(TARGET_FDO_CFLAGS)
+  ifeq ($(strip $(LOCAL_IS_HOST_MODULE)),)
+    LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
+    LOCAL_CPPFLAGS += $(TARGET_FDO_CFLAGS)
+    LOCAL_LDFLAGS += $(TARGET_FDO_CFLAGS)
+  endif
 endif
 
 ####################################################