| 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..4c770d9802c6015a0e27a1477a50ef1e8570097b 100644
|
| --- a/platform_tools/android/bin/gyp_to_android.py
|
| +++ b/platform_tools/android/bin/gyp_to_android.py
|
| @@ -26,6 +26,8 @@ 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 gen_public_headers
|
| import makefile_writer
|
| import vars_dict_lib
|
|
|
| @@ -70,6 +72,11 @@ def main(target_dir=None):
|
| @param target_dir Directory in which to place 'Android.mk'. If None, the file
|
| will be placed in skia's root directory.
|
| """
|
| + # Update public_headers.gypi
|
| + gen_public_headers.generate_public_headers(
|
| + dst=os.path.join(SKIA_DIR, GYP_FOLDER, 'public_headers.gypi'),
|
| + top_dir=os.path.join(SKIA_DIR, 'include'))
|
| +
|
| # Create a temporary folder to hold gyp and gypd files. Create it in SKIA_DIR
|
| # so that it is a sibling of gyp/, so the relationships between gyp files and
|
| # other files (e.g. platform_tools/android/gyp/dependencies.gypi, referenced
|
| @@ -106,13 +113,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 +159,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)
|
|
|
|
|