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

Issue 1093643002: Fix gn jni generation rules for Android (Closed)

Created:
5 years, 8 months ago by Primiano Tucci (use gerrit)
Modified:
5 years, 8 months ago
Reviewers:
cjhopman, Torne
CC:
chromium-reviews, ssid
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix gn jni generation rules for Android The GN rules for the JNI generator currently generate the --includes argument (that is, the #include line which gets emitted in the generated jni.h header) in the following way: generate_jni: always relative to the src root (e.g., content/foo/bar.h) this is achieved by rebasing the jni_generator_include against //. generate_jar_jni: relative to on root_build_dir (typically out/Release, hence ../../content/foo/bar.h). This is achieved by rebasing the jni_generator_include against root_build_dir. generate_jni is fine, but relies on the target having set the root src/ dir in the include path. The latter, instead, happens to work only by accident because the targets that currently use it (currently just surface_jni_headers) happen to have an include path which is at distance two from the root src/ (so the generated #include "../../base" happens to work). This CL fixes both cases and causes the generated include to be always relative to the destination folder of the generated header (jni_output_dir). Furthermore, this change removes the dependency on the generated header path. Rationale: the file itself is not an input for the generator, the --include string gets just copied and pasted into the generated file. Hence, the generator should not be re-run if the contents of the jni_generator_helper.h changes. Committed: https://crrev.com/9d6b1606854a8786e94858e1f65b2ae451e58ddf Cr-Commit-Position: refs/heads/master@{#325604}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -6 lines) Patch
M build/config/android/rules.gni View 4 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Primiano Tucci (use gerrit)
Chris,Torne can you PTAL to this. Rational for doing this: ssid@ in our team was ...
5 years, 8 months ago (2015-04-16 17:13:42 UTC) #2
cjhopman
lgtm
5 years, 8 months ago (2015-04-16 20:32:56 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1093643002/1
5 years, 8 months ago (2015-04-17 07:09:03 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 8 months ago (2015-04-17 07:13:05 UTC) #6
commit-bot: I haz the power
5 years, 8 months ago (2015-04-17 07:13:58 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9d6b1606854a8786e94858e1f65b2ae451e58ddf
Cr-Commit-Position: refs/heads/master@{#325604}

Powered by Google App Engine
This is Rietveld 408576698