Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a605760 authored by synergydev's avatar synergydev
Browse files

FDO: do not support host modules

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.
parent 840f9d0a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -115,10 +115,12 @@ endif
## Add FDO flags if FDO is turned on and supported
####################################################
ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),)
  ifeq ($(strip $(LOCAL_IS_HOST_MODULE)),)
    LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
    LOCAL_CPPFLAGS += $(TARGET_FDO_CFLAGS)
    LOCAL_LDFLAGS += $(TARGET_FDO_CFLAGS)
  endif
endif

####################################################
## Add profiling flags if aprof is turned on