Update the FDO support:

* Explicitly check BUILD_FDO_INSTRUMENT and BUILD_FDO_OPTIMIZE with true
* Remove unnecessary target_libgcov
* Update the profile collection path on device so that most app can have write access

Change-Id: I5c1915a12ea37b2cb3c76a27e7104e47ad636928
diff --git a/core/combo/fdo.mk b/core/combo/fdo.mk
index 26e842f..93d9a9c 100644
--- a/core/combo/fdo.mk
+++ b/core/combo/fdo.mk
@@ -17,15 +17,13 @@
 # Setup FDO related flags.
 
 $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS:=
-$(combo_2nd_arch_prefix)TARGET_FDO_LIB:=
 
-ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
+ifeq ($(strip $(BUILD_FDO_INSTRUMENT)), true)
   # Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
-  # The profile will be generated on /data/local/tmp/profile on the device.
-  $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS := -fprofile-generate=/data/local/tmp/fdo_profile -DANDROID_FDO
-  $(combo_2nd_arch_prefix)TARGET_FDO_LIB := $(target_libgcov)
+  # The profile will be generated on /sdcard/fdo_profile on the device.
+  $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS := -fprofile-generate=/sdcard/fdo_profile -DANDROID_FDO
 else
-  ifneq ($(strip $(BUILD_FDO_OPTIMIZE)),)
+  ifeq ($(strip $(BUILD_FDO_OPTIMIZE)), true)
     # Set TARGET_FDO_PROFILE_PATH to set a custom profile directory for your build.
     ifeq ($(strip $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH)),)
       $(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH := fdo_profiles
@@ -33,7 +31,6 @@
 
     ifneq ($(strip $(wildcard $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH))),)
       $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS := -fprofile-use=$($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH) -DANDROID_FDO -fprofile-correction -Wcoverage-mismatch -Wno-error
-      $(combo_2nd_arch_prefix)TARGET_FDO_LIB := $(target_libgcov)
     else
       $(warning Profile directory $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH) does not exist. Turn off FDO.)
     endif