aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/bin/gyp_to_android.py
Commit message (Collapse)AuthorAge
* Update Android framework makefile to build static and shared libsGravatar djsollen2016-02-12
| | | | | | | | Also use static lib for testing tools and expose includes needed for other framework testing tools to statically link in Skia. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1696483002 Review URL: https://codereview.chromium.org/1696483002
* Don't use m32 cflag for x86_64.Gravatar scroggo2015-02-12
| | | | | | | | | | | | | | | | | When checking the skia_arch_type for "x86", instead of doing an == compare, check if "x86" in skia_arch_type, so it will cover both x86 and x86_64. Except when we specifically want x86. Set skia_arch_width based on "64" in skia_arch_type. No need to specify in scripts. In gyp_to_android.py, create a separate var_dict for x86_64. BUG=skia:3419 Review URL: https://codereview.chromium.org/916113002
* Add ability to specify gyp dir to gyp_to_android.Gravatar scroggo2015-01-20
| | | | | | | | | | | | | | When running gyp_to_android inside a Skia tree, it uses the gyp program in third_party/externals. Inside an Android tree, we need to use a different location for gyp (the Android copy of Skia, in external/skia, does not contain third_party/externals). The bot handles this by importing gyp_to_android and running its main function directly. Add command line arguments so a human can directly run gyp_to_android. Review URL: https://codereview.chromium.org/864503002
* Stop building gm in Android framework build.Gravatar scroggo2015-01-20
| | | | | | Allows us to delete gm. Review URL: https://codereview.chromium.org/860803004
* Pass gyp_source_dir to generate_tool.Gravatar scroggo2014-12-12
| | | | | | | | | | | | | When generating the tool makefiles, which also calls android_framework_gyp, we also need to pass the gyp directory. TBR=borenet NOTRY=True NOTREECHECKS=True BUG=skia:3233 Review URL: https://codereview.chromium.org/804473005
* Add parameter to specify gyp dir to gyp_to_android.Gravatar scroggo2014-12-11
| | | | | | | | NOTRY=true NOTREECHECKS=True BUG=skia:3233 Review URL: https://codereview.chromium.org/800573002
* Android.mk: bench_pictures -> nanobenchGravatar mtklein2014-08-18
| | | | | | | | | | | We're only keeping bench_pictures around for the bots now. For human-initiated work, nanobench is the way to go. BUG=skia: R=djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/484663002
* Bye bye bench.Gravatar mtklein2014-08-06
| | | | | | | | | | | NOTREECHECKS=true BUG=skia: R=djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/442343004
* Stop building tests in the Android tree.Gravatar mtklein2014-08-04
| | | | | | | | | BUG=skia: R=djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/440653004
* Generate makefile for bench_pictures.Gravatar scroggo2014-07-17
| | | | | | | | | | | | When generating Android framework makefiles, create one for bench_pictures. BUG=skia:2744 R=djsollen@google.com, halcanary@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/391423002
* Alphabetize defines in generated SkUserConfig.Gravatar scroggo2014-07-14
| | | | | | | | | | | | | When generating SkUserConfig.h for Android, alphabetize the defines. This will make one merge much harder to look at, but every following one much easier. R=mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/388693003
* Use BUILD_NATIVE_TEST instead of BUILD_EXECUTABLE.Gravatar scroggo2014-07-08
| | | | | | | | | | | | | | | | This will generate makefiles for our tools (bench, tests, gm, dm) using the line "include $(BUILD_NATIVE_TEST)". This has been recommended by the Android team, as it builds both 32 bit and 64 bit versions of the test. Do not use LOCAL_MODULE_PATH, which is deprecated (see https://docs.google.com/a/google.com/document/d/1uLAuY7_KYGx1TSzJ9SXkyevT8qNpra2ZoIBkmCoq8VM/edit# ). Corresponds to ag/498302 , which makes this change just for bench. R=djsollen@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/369673002
* Specify the name of tool for creating a makefile.Gravatar scroggo2014-07-01
| | | | | | | | | | | | | | | | | When generating tool Android.mks from gyp files, specify the name of the target needed. This fixes a bug where nanobench was being added to the same makefile as bench, which would not compile. TODO: Make gyp_to_android more general, so that it handles this case better. See http://skbug.com/2709 R=mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/366653002
* Add mips64 to the makefile.Gravatar scroggo2014-06-05
| | | | | | | | | | | | | Currently we have no optimizations for mips64, so it correctly contains the various _none.cpps. Corresponds to https://android-review.googlesource.com/#/c/96536/1 R=halcanary@google.com, djsollen@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/311163003
* Use tests tag for Skia tools on Android.Gravatar scroggo2014-06-04
| | | | | | | | | | | When generating the makefiles for Skia testing tools on Android, use the tag 'tests' and do not use the tags 'optional' or 'eng'. R=djsollen@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/315013003
* Generate Android.mk for DM.Gravatar commit-bot@chromium.org2014-05-16
| | | | | | | | | | | | | | | | | ifdef out code that won't build where we don't have jsoncpp. Include ctype instead of string.h for tolower. Depends on https://codereview.chromium.org/282053002/ BUG=skia:2447 R=mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/290603002 git-svn-id: http://skia.googlecode.com/svn/trunk@14768 2bbb7eff-a529-9590-31e7-b0007b416f81
* Generate gm/Android.mk, minus JSON.Gravatar commit-bot@chromium.org2014-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running gyp_to_android.py, generate the makefile for gm. For now, remove json functionality and do not depend on json. This allows us to build and run until solving skbug.com/2448. gm/gm_expectations.cpp: gm/gm_expectations.h: gm/gmmain.cpp: Remove all json functionality when SK_BUILD_JSON_WRITER is not defined. This flag is not defined when SK_BUILD_FOR_ANDROID is defined. gyp/gm.gyp: Depend on skia and cutils. platform_tools/android/bin/gyp_to_android.py: Generate gm/Android.mk. platform_tools/android/gyp_gen/makefile_writer.py: Build gm/Android.mk when building external/skia. Depends on https://codereview.chromium.org/282053002/ BUG=skia:2447 BUG=skia:2448 R=epoger@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/281303003 git-svn-id: http://skia.googlecode.com/svn/trunk@14767 2bbb7eff-a529-9590-31e7-b0007b416f81
* Generate bench/Android.mk from gyp.Gravatar commit-bot@chromium.org2014-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now, remove json functionality and do not depend on json. This allows us to build and run until solving skbug.com/2448. bench/DeferredSurfaceCopyBench.cpp: Include GrRenderTarget last, so SK_SUPPORT_GPU will be set properly. bench/ResultsWriter.h: bench/benchmain.cpp: Remove JSONResultsWriter when SK_BUILD_JSON_WRITER is not defined, which is the case for the Android framework build. gyp/bench.gyp: Depend on skia and cutils (for android_atomic_inc etc). gyp/common_conditions.gypi: Define SK_BUILD_JSON_WRITER when skia_build_json_writer is set. gyp/common_variables.gypi: Add a flag for skia_build_json_writer, and set it only when skia_android_framework is not set. gyp/jsoncpp.gyp: Do not build jsoncpp when skia_build_json_writer is not defined. include/utils/SkJSONCPP.h: Do not include json headers when SK_BUILD_JSON_WRITER is not defined. platform_tools/android/bin/gyp_to_android.py: Generate bench/Android.mk. platform_tools/android/gyp_gen/gypd_parser.py: Skip dest_dir when checking for include_dirs. platform_tools/android/gyp_gen/makefile_writer.py: Build bench/Android.mk when building external/skia. platform_tools/android/gyp_gen/tool_makefile_writer.py: Add a parameter for putting the binary into /data/local/tmp. BUG=skia:2447 BUG=skia:2448 R=halcanary@google.com, reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/282053002 git-svn-id: http://skia.googlecode.com/svn/trunk@14760 2bbb7eff-a529-9590-31e7-b0007b416f81
* Explicitly include gyp_gen/android_framework_gyp.Gravatar commit-bot@chromium.org2014-04-29
| | | | | | | | | | | | | | | | | Add __init__.py to gyp_gen and explicitly include android_framework_gyp from there. Fixes a bug where after moving that file, python was looking for it in its old location, where there was a compiled version of the file. BUG=skia:2468 R=epoger@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/251903003 git-svn-id: http://skia.googlecode.com/svn/trunk@14427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Generate tests/Android.mk from gypGravatar commit-bot@chromium.org2014-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gyp/apptype_console.gypi: Don't include console app dependencies when building for Android framework. gyp/tests.gyp: Add/remove libraries for framework build. platform_tools/android/bin/android_framework_gyp.py: Moved to gyp_gen. clean_up_gypd_files moved to this script. platform_tools/android/bin/gyp_to_android.py: Call new function for generating tool makefile. Set LOCAL_MODULE. platform_tools/android/gyp_gen/gypd_parser.py: Support relative paths. platform_tools/android/gyp_gen/makefile_writer.py: Factor out helper functions to be used by tool writer. LOCAL_MODULE is set elsewhere. platform_tools/android/gyp_gen/tool_makefile_writer.py: Multipurpose file for writing makefiles for tools. Should be able to use it mostly unchanged for bench, gm, etc. platform_tools/android/gyp_gen/vars_dict_lib.py: Make the comments follow the style guide. Add set(). Rename __li to __ordered_set More/update tests: platform_tools/android/tests/android_framework_gyp_tests.py platform_tools/android/tests/expectations/Android.mk platform_tools/android/tests/expectations/tool/Android.mk platform_tools/android/tests/expectations/write_local_vars_append_arm platform_tools/android/tests/expectations/write_local_vars_append_foo platform_tools/android/tests/expectations/write_local_vars_append_no_name platform_tools/android/tests/expectations/write_local_vars_no_append_arm platform_tools/android/tests/expectations/write_local_vars_no_append_foo platform_tools/android/tests/expectations/write_local_vars_no_append_no_name platform_tools/android/tests/gyp_to_android_tests.py platform_tools/android/tests/makefile_writer_tests.py platform_tools/android/tests/ordered_set_tests.py platform_tools/android/tests/test_variables.py BUG=skia:2447 May require an update to the bot to remove pyc files. R=halcanary@google.com, djsollen@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/235883015 git-svn-id: http://skia.googlecode.com/svn/trunk@14408 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow running gyp_to_android without SkUserConfig.Gravatar commit-bot@chromium.org2014-04-21
| | | | | | | | | | | | | | | | | | | | | | The old code requires that include/config/SkUserConfig.h exists, to ensure that it gets copied into Android's include/core/SkUserConfig.h when we do a merge. However, if a developer wants to make changes and rerun the script, they should not have to recreate include/config/SkUserConfig.h just to rerun the script. By default, allow the original to not exist and just skip the copy. Update tests to pass. Also add tests to support this use case. Make gyp_to_android.py executable. R=robertphillips@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/242203008 git-svn-id: http://skia.googlecode.com/svn/trunk@14273 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updates to Android.mk generation.Gravatar commit-bot@chromium.org2014-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate SkUserConfig. Include arm64 as another build flavor. Add tests. gyp/common_conditions.gypi: Add conditions for Android framework. These will get written into the generated SkUserConfig. include/core/SkUserConfig.h: Generated version that will ultimately be checked into Android (but not here). platform_tools/android/bin/gyp_to_android.py: Generate SkUserConfig. Add arm64 (note that arm64 is not currently respected by our gyp files, so it results in use _none.cpp for the various opts). Reset the common defines, which are now passed to the generated SkUserConfig. platform_tools/android/gyp_gen/generate_user_config.py: New script to generate SkUserConfig.h. platform_tools/android/gyp_gen/gypd_parser.py: Fix a lint error (unused import). platform_tools/android/gyp_gen/makefile_writer.py: Append any remaining DEFINES to LOCAL_CFLAGS (previously this was done during parsing). Add a warning for arm64 (corresponds to downstream Android.mk). platform_tools/android/gyp_gen/vars_dict_lib.py: Add OrderedSet.reset(). Add DEFINES to VarsDict. platform_tools/android/tests/expectations/: Add and update expectations files. platform_tools/android/tests/generate_user_config_tests.py: New test for generate_user_config.py platform_tools/android/tests/inputs/SkUserConfig.h: Input to the new test, so we don't have to update the expectations each time the real SkUserConfig.h changes. platform_tools/android/tests/makefile_writer_tests.py: Add a way to rebaseline test_write_local_vars, which has changed. Refactor EXPECTATIONS_DIR and compare_files into a separate file for sharing with generate_user_config_tests.py. platform_tools/android/tests/utils.py: Common code for tests. platform_tools/android/tests/var_dict_tests.py: Use a for loop to test the new key (DEFINES) and future proof this test to test any new keys in the future. BUG=skia:1975 R=djsollen@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/198063002 git-svn-id: http://skia.googlecode.com/svn/trunk@13975 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updates to the Android.mk writer.Gravatar commit-bot@chromium.org2014-02-28
| | | | | | | | | | | | | Keeping up with changes made to the Android.mk file that is currently checked in. R=djsollen@google.com, epoger@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/183953002 git-svn-id: http://skia.googlecode.com/svn/trunk@13626 2bbb7eff-a529-9590-31e7-b0007b416f81
* Scripts to generate Android.mk for framework Skia.Gravatar commit-bot@chromium.org2014-02-06
In order to create Android.mk, run >> python platform_tools/android/bin/gyp_to_android.py For the change in the Android.mk file, see https://googleplex-android-review.git.corp.google.com/#/c/408170/ (SkipBuildbotRuns) BUG=skia:1975 R=djsollen@google.com, epoger@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/140503007 git-svn-id: http://skia.googlecode.com/svn/trunk@13344 2bbb7eff-a529-9590-31e7-b0007b416f81