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

Issue 198063002: Updates to Android.mk generation. (Closed)

Created:
6 years, 9 months ago by scroggo
Modified:
6 years, 9 months ago
Reviewers:
hal.canary, djsollen
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@android_mk
Visibility:
Public.

Description

Updates to Android.mk generation. 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 Committed: http://code.google.com/p/skia/source/detail?r=13975

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 15

Patch Set 3 : Rebase #

Total comments: 2

Patch Set 4 : Respond to comments, update tests, don't generate public_header.gypi #

Patch Set 5 : Rebase onto master #

Patch Set 6 : Add a comment explaining the motivation of OrderedSet. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -98 lines) Patch
M gyp/common_conditions.gypi View 1 1 chunk +20 lines, -2 lines 0 comments Download
M platform_tools/android/bin/gyp_to_android.py View 1 2 3 3 chunks +23 lines, -1 line 0 comments Download
A platform_tools/android/gyp_gen/generate_user_config.py View 1 chunk +96 lines, -0 lines 0 comments Download
M platform_tools/android/gyp_gen/gypd_parser.py View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M platform_tools/android/gyp_gen/makefile_writer.py View 1 2 2 chunks +16 lines, -2 lines 0 comments Download
M platform_tools/android/gyp_gen/vars_dict_lib.py View 1 2 3 4 5 3 chunks +11 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/Android.mk View 1 2 3 4 chunks +13 lines, -0 lines 0 comments Download
A platform_tools/android/tests/expectations/SkUserConfig.h View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_append_arm View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_append_foo View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_append_no_name View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_no_append_arm View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_no_append_foo View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M platform_tools/android/tests/expectations/write_local_vars_no_append_no_name View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A platform_tools/android/tests/generate_user_config_tests.py View 1 2 3 1 chunk +89 lines, -0 lines 0 comments Download
A + platform_tools/android/tests/inputs/SkUserConfig.h View 1 2 3 1 chunk +3 lines, -6 lines 0 comments Download
M platform_tools/android/tests/makefile_writer_tests.py View 1 2 3 5 chunks +64 lines, -61 lines 0 comments Download
M platform_tools/android/tests/ordered_set_tests.py View 1 chunk +9 lines, -0 lines 0 comments Download
A platform_tools/android/tests/utils.py View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
M platform_tools/android/tests/var_dict_tests.py View 1 2 3 1 chunk +3 lines, -23 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
scroggo
Derek, This CL generates SkUserConfig and public_headers.gypi I still need to look back over the ...
6 years, 9 months ago (2014-03-12 19:53:53 UTC) #1
scroggo
https://codereview.chromium.org/198063002/diff/20001/gyp/public_headers.gypi File gyp/public_headers.gypi (right): https://codereview.chromium.org/198063002/diff/20001/gyp/public_headers.gypi#newcode4 gyp/public_headers.gypi:4: # THIS FILE IS AUTOGENERATED BY GYP_TO_ANDROID.PY. DO NOT ...
6 years, 9 months ago (2014-03-25 22:03:00 UTC) #2
djsollen
https://codereview.chromium.org/198063002/diff/20001/Android.mk File Android.mk (right): https://codereview.chromium.org/198063002/diff/20001/Android.mk#newcode6 Android.mk:6: ############################################################################### Is this file just for reference? Or do ...
6 years, 9 months ago (2014-03-26 13:07:53 UTC) #3
scroggo
https://codereview.chromium.org/198063002/diff/20001/Android.mk File Android.mk (right): https://codereview.chromium.org/198063002/diff/20001/Android.mk#newcode6 Android.mk:6: ############################################################################### On 2014/03/26 13:07:53, djsollen wrote: > Is this ...
6 years, 9 months ago (2014-03-26 15:58:38 UTC) #4
djsollen
modulo my comments I'm fine with the non-python portion of the code. https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi File gyp/common.gypi ...
6 years, 9 months ago (2014-03-26 20:17:03 UTC) #5
hal.canary
https://codereview.chromium.org/198063002/diff/110001/platform_tools/android/gyp_gen/gen_public_headers.py File platform_tools/android/gyp_gen/gen_public_headers.py (right): https://codereview.chromium.org/198063002/diff/110001/platform_tools/android/gyp_gen/gen_public_headers.py#newcode39 platform_tools/android/gyp_gen/gen_public_headers.py:39: headers = [] More Pythonic: return sorted( os.path.join(dirpath, filename) ...
6 years, 9 months ago (2014-03-27 12:30:15 UTC) #6
scroggo
Derek, I believe I've addressed your comments. Hal, can you review the python code? https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi ...
6 years, 9 months ago (2014-03-27 19:33:00 UTC) #7
scroggo
On 2014/03/27 19:33:00, scroggo wrote: > Derek, I believe I've addressed your comments. Hal, can ...
6 years, 9 months ago (2014-03-28 14:05:11 UTC) #8
hal.canary
On 2014/03/28 14:05:11, scroggo wrote: > Hal's given me a verbal LGTM; can I get ...
6 years, 9 months ago (2014-03-28 14:09:39 UTC) #9
djsollen
lgtm
6 years, 9 months ago (2014-03-28 14:34:58 UTC) #10
scroggo
On 2014/03/28 14:09:39, Hal Canary wrote: > On 2014/03/28 14:05:11, scroggo wrote: > > Hal's ...
6 years, 9 months ago (2014-03-28 14:46:44 UTC) #11
scroggo
The CQ bit was checked by scroggo@google.com
6 years, 9 months ago (2014-03-28 14:48:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/scroggo@google.com/198063002/160001
6 years, 9 months ago (2014-03-28 14:48:16 UTC) #13
commit-bot: I haz the power
Change committed as 13975
6 years, 9 months ago (2014-03-28 15:59:12 UTC) #14
scroggo
https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi File gyp/common.gypi (right): https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi#newcode93 gyp/common.gypi:93: 'SK_SCALAR_TO_FLOAT_EXCLUDED', On 2014/03/27 19:33:00, scroggo wrote: > On 2014/03/26 ...
6 years, 9 months ago (2014-03-28 17:39:27 UTC) #15
djsollen
6 years, 9 months ago (2014-03-28 20:54:52 UTC) #16
Message was sent while issue was closed.
On 2014/03/28 17:39:27, scroggo wrote:
> https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi
> File gyp/common.gypi (right):
> 
> https://codereview.chromium.org/198063002/diff/20001/gyp/common.gypi#newcode93
> gyp/common.gypi:93: 'SK_SCALAR_TO_FLOAT_EXCLUDED',
> On 2014/03/27 19:33:00, scroggo wrote:
> > On 2014/03/26 20:17:03, djsollen wrote:
> > > why do we need to call this out here?  Won't we need this for now if the
> > WebView
> > > wanted to use the system copy of Skia?
> > 
> > Removed.
> 
> It turns out we *do* need this here*. All the negatives are confusing, but
> here's how it works:
> 
> If you define this flag, SkFloatToScalar is not defined.
> 
> Android still uses SkFloatToScalar:
> https://cs.corp.google.com/#search/&q=skfloattoscalar&sq=package:android
> 
> Here I'm changing it so we do *not* define this flag, meaning that
> SkFloatToScalar *is* defined.
> 
> Defining SkFloatToScalar will not interfere with building WebView.
> 
> *Until we stop calling SkFloatToScalar in frameworks/base.

Thanks for the info. Lets file an bug in Android and go ahead and clean that up.

Powered by Google App Engine
This is Rietveld 408576698