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

Unified Diff: platform_tools/android/bin/gyp_to_android.py

Issue 183953002: Updates to the Android.mk writer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Space between # and TODO Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | platform_tools/android/gyp_gen/makefile_writer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/gyp_to_android.py
diff --git a/platform_tools/android/bin/gyp_to_android.py b/platform_tools/android/bin/gyp_to_android.py
index 7990ae9d8b97acf0269f193b20b1230eef29d428..191d0390fe91580d42307e1f4d87b98027909a8b 100644
--- a/platform_tools/android/bin/gyp_to_android.py
+++ b/platform_tools/android/bin/gyp_to_android.py
@@ -27,12 +27,13 @@ sys.path.append(GYP_GEN_DIR)
import gypd_parser
import makefile_writer
-import variables
import vars_dict_lib
# Folder containing all gyp files and generated gypd files.
GYP_FOLDER = 'gyp'
+# TODO(scroggo): Update the docstrings to match the style guide:
+# http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Comments
def clean_gypd_files(folder):
"""
Remove the gypd files generated by android_framework_gyp.main().
@@ -101,17 +102,15 @@ def main(target_dir=None):
arm_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', False)
arm_neon_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm',
True)
- if variables.INCLUDE_X86_OPTS:
- x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False)
- else:
- x86_var_dict = None
+ x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False)
+
+ mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False)
# Compute the intersection of all targets. All the files in the intersection
# should be part of the makefile always. Each dict will now contain trimmed
# lists containing only variable definitions specific to that configuration.
- var_dict_list = [default_var_dict, arm_var_dict, arm_neon_var_dict]
- if variables.INCLUDE_X86_OPTS:
- var_dict_list.append(x86_var_dict)
+ var_dict_list = [default_var_dict, arm_var_dict, arm_neon_var_dict,
+ x86_var_dict, mips_var_dict]
common = vars_dict_lib.intersect(var_dict_list)
# Further trim arm_neon_var_dict with arm_var_dict. After this call,
@@ -120,12 +119,23 @@ def main(target_dir=None):
# those specific to arm + neon.
arm_var_dict = vars_dict_lib.intersect([arm_var_dict, arm_neon_var_dict])
+ # Now create a list of VarsDictData holding everything but common.
+ deviations_from_common = []
+ deviations_from_common.append(makefile_writer.VarsDictData(
+ arm_var_dict, 'arm'))
+ deviations_from_common.append(makefile_writer.VarsDictData(
+ arm_neon_var_dict, 'arm', 'ARCH_ARM_HAVE_NEON'))
+ deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict,
+ 'x86'))
+ # Currently, x86_64 is identical to x86
+ deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict,
+ 'x86_64'))
+
+ deviations_from_common.append(makefile_writer.VarsDictData(mips_var_dict,
+ 'mips'))
+
makefile_writer.write_android_mk(target_dir=target_dir,
- common=common,
- arm=arm_var_dict,
- arm_neon=arm_neon_var_dict,
- x86=x86_var_dict,
- default=default_var_dict)
+ common=common, deviations_from_common=deviations_from_common)
finally:
shutil.rmtree(tmp_folder)
« no previous file with comments | « no previous file | platform_tools/android/gyp_gen/makefile_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698