Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: platform_tools/android/gyp_gen/makefile_writer.py

Issue 497503003: Update FDO options to match what is needed by the framework (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: making code uglier to satisfy python linter Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2014 Google Inc. 3 # Copyright 2014 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 """ 8 """
9 Functions for creating an Android.mk from already created dictionaries. 9 Functions for creating an Android.mk from already created dictionaries.
10 """ 10 """
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 if target_dir: 187 if target_dir:
188 target_file = os.path.join(target_dir, target_file) 188 target_file = os.path.join(target_dir, target_file)
189 with open(target_file, 'w') as f: 189 with open(target_file, 'w') as f:
190 f.write(AUTOGEN_WARNING) 190 f.write(AUTOGEN_WARNING)
191 f.write('BASE_PATH := $(call my-dir)\n') 191 f.write('BASE_PATH := $(call my-dir)\n')
192 write_local_path(f) 192 write_local_path(f)
193 193
194 f.write(DEBUGGING_HELP) 194 f.write(DEBUGGING_HELP)
195 195
196 write_clear_vars(f) 196 write_clear_vars(f)
197
198 # need flags to enable feedback driven optimization (FDO) when requested
199 # by the build system.
197 f.write('LOCAL_FDO_SUPPORT := true\n') 200 f.write('LOCAL_FDO_SUPPORT := true\n')
201 f.write(
202 'ifneq ($(strip $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_FDO_CFLAGS)),)\n')
203 f.write('\t# This should be the last -Oxxx specified in LOCAL_CFLAGS\n')
204 f.write('\tLOCAL_CFLAGS += -O2\n')
205 f.write('endif\n\n')
206
198 f.write('LOCAL_ARM_MODE := thumb\n') 207 f.write('LOCAL_ARM_MODE := thumb\n')
199 208
200 # need a flag to tell the C side when we're on devices with large memory 209 # need a flag to tell the C side when we're on devices with large memory
201 # budgets (i.e. larger than the low-end devices that initially shipped) 210 # budgets (i.e. larger than the low-end devices that initially shipped)
202 # On arm, only define the flag if it has VFP. For all other architectures, 211 # On arm, only define the flag if it has VFP. For all other architectures,
203 # always define the flag. 212 # always define the flag.
204 f.write('ifeq ($(TARGET_ARCH),arm)\n') 213 f.write('ifeq ($(TARGET_ARCH),arm)\n')
205 f.write('\tifeq ($(ARCH_ARM_HAVE_VFP),true)\n') 214 f.write('\tifeq ($(ARCH_ARM_HAVE_VFP),true)\n')
206 f.write('\t\tLOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE\n') 215 f.write('\t\tLOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE\n')
207 f.write('\tendif\n') 216 f.write('\tendif\n')
(...skipping 14 matching lines...) Expand all
222 if data.condition: 231 if data.condition:
223 f.write('ifeq ($(%s), true)\n' % data.condition) 232 f.write('ifeq ($(%s), true)\n' % data.condition)
224 write_local_vars(f, data.vars_dict, True, data.name) 233 write_local_vars(f, data.vars_dict, True, data.name)
225 if data.condition: 234 if data.condition:
226 f.write('endif\n\n') 235 f.write('endif\n\n')
227 236
228 write_include_stlport(f) 237 write_include_stlport(f)
229 f.write('include $(BUILD_SHARED_LIBRARY)\n') 238 f.write('include $(BUILD_SHARED_LIBRARY)\n')
230 f.write(SKIA_TOOLS) 239 f.write(SKIA_TOOLS)
231 240
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698