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

Issue 227303003: android: Don't use cpp to strip comments in jni_generator. (Closed)

Created:
6 years, 8 months ago by Torne
Modified:
6 years, 8 months ago
Reviewers:
bulach, benm (inactive)
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

For the WebView build, invoking "cpp" from $PATH is problematic on some host platforms because the Android build system is intended to use hermetic toolchains. However, using the hermetic toolchain correctly is also difficult. To avoid this, use a regex to strip comments instead of invoking cpp. This regex shoud handle all the Java source cases correctly (it deals with strings that contain //, /* or */) and should also improve performance compared to invoking cpp. The JNI generator tests pass with this change. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263650

Patch Set 1 #

Patch Set 2 : Fix android topdir reference #

Patch Set 3 : Fix args for gcc #

Patch Set 4 : Completely different approach #

Total comments: 6

Patch Set 5 : address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -14 lines) Patch
M base/android/jni_generator/jni_generator.py View 1 2 3 4 2 chunks +20 lines, -14 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Torne
6 years, 8 months ago (2014-04-11 09:23:57 UTC) #1
Torne
Argh, none of this works on the bots even though it works on my machine ...
6 years, 8 months ago (2014-04-11 13:21:49 UTC) #2
Torne
OK, I've completely rewritten this CL to just drop the use of cpp entirely, and ...
6 years, 8 months ago (2014-04-11 14:59:55 UTC) #3
bulach
lgtm, thanks! small suggestions.. https://codereview.chromium.org/227303003/diff/60001/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/227303003/diff/60001/base/android/jni_generator/jni_generator.py#newcode600 base/android/jni_generator/jni_generator.py:600: _comment_remover_regex = re.compile( nit: maybe ...
6 years, 8 months ago (2014-04-14 11:30:44 UTC) #4
Torne
https://codereview.chromium.org/227303003/diff/60001/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/227303003/diff/60001/base/android/jni_generator/jni_generator.py#newcode600 base/android/jni_generator/jni_generator.py:600: _comment_remover_regex = re.compile( On 2014/04/14 11:30:44, bulach wrote: > ...
6 years, 8 months ago (2014-04-14 11:41:05 UTC) #5
Torne
The CQ bit was checked by torne@chromium.org
6 years, 8 months ago (2014-04-14 14:13:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/torne@chromium.org/227303003/80001
6 years, 8 months ago (2014-04-14 14:13:32 UTC) #7
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 17:30:13 UTC) #8
Message was sent while issue was closed.
Change committed as 263650

Powered by Google App Engine
This is Rietveld 408576698