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

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

Issue 198063002: Updates to Android.mk generation. (Closed) Base URL: https://skia.googlesource.com/skia.git@android_mk
Patch Set: Add a comment explaining the motivation of OrderedSet. Created 6 years, 9 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 | « gyp/common_conditions.gypi ('k') | platform_tools/android/gyp_gen/generate_user_config.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 191d0390fe91580d42307e1f4d87b98027909a8b..c8abfb60fdc8f1167fd3edbbdc17da141ffcecd5 100644
--- a/platform_tools/android/bin/gyp_to_android.py
+++ b/platform_tools/android/bin/gyp_to_android.py
@@ -26,6 +26,7 @@ GYP_GEN_DIR = os.path.join(SKIA_DIR, 'platform_tools', 'android', 'gyp_gen')
sys.path.append(GYP_GEN_DIR)
import gypd_parser
+import generate_user_config
import makefile_writer
import vars_dict_lib
@@ -106,13 +107,31 @@ def main(target_dir=None):
mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False)
+ arm64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm64',
+ 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,
- x86_var_dict, mips_var_dict]
+ x86_var_dict, mips_var_dict, arm64_var_dict]
common = vars_dict_lib.intersect(var_dict_list)
+ # Create SkUserConfig
+ user_config = os.path.join(SKIA_DIR, 'include', 'config', 'SkUserConfig.h')
+ if target_dir:
+ dst_dir = target_dir
+ else:
+ dst_dir = os.path.join(SKIA_DIR, 'include', 'core')
+
+ generate_user_config.generate_user_config(
+ original_sk_user_config=user_config, target_dir=dst_dir,
+ ordered_set=common.DEFINES)
+
+ # Now that the defines have been written to SkUserConfig, they are not
+ # needed in Android.mk.
+ common.DEFINES.reset()
+
# Further trim arm_neon_var_dict with arm_var_dict. After this call,
# arm_var_dict (which will now be the intersection) includes all definitions
# used by both arm and arm + neon, and arm_neon_var_dict will only contain
@@ -134,6 +153,9 @@ def main(target_dir=None):
deviations_from_common.append(makefile_writer.VarsDictData(mips_var_dict,
'mips'))
+ deviations_from_common.append(makefile_writer.VarsDictData(arm64_var_dict,
+ 'arm64'))
+
makefile_writer.write_android_mk(target_dir=target_dir,
common=common, deviations_from_common=deviations_from_common)
« no previous file with comments | « gyp/common_conditions.gypi ('k') | platform_tools/android/gyp_gen/generate_user_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698