Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / platform_tools / android / gyp_gen / makefile_writer.py
index ddd584e..d8d0c61 100644 (file)
@@ -117,7 +117,7 @@ SKIA_TOOLS = (
 #
 
 # benchmark (timings)
-include $(BASE_PATH)/tools/Android.mk
+include $(BASE_PATH)/bench/Android.mk
 
 # golden-master (fidelity / regression test)
 include $(BASE_PATH)/gm/Android.mk
@@ -194,7 +194,15 @@ def write_android_mk(target_dir, common, deviations_from_common):
     f.write(DEBUGGING_HELP)
 
     write_clear_vars(f)
+
+    # need flags to enable feedback driven optimization (FDO) when requested
+    # by the build system.
     f.write('LOCAL_FDO_SUPPORT := true\n')
+    f.write('ifneq ($(strip $(TARGET_FDO_CFLAGS)),)\n')
+    f.write('\t# This should be the last -Oxxx specified in LOCAL_CFLAGS\n')
+    f.write('\tLOCAL_CFLAGS += -O2\n')
+    f.write('endif\n\n')
+
     f.write('LOCAL_ARM_MODE := thumb\n')
 
     # need a flag to tell the C side when we're on devices with large memory