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

Issue 2121833002: 🎢 Add a GN assert preventing android templates in non-default toolchain (Closed)

Created:
4 years, 5 months ago by agrieve
Modified:
4 years, 5 months ago
Reviewers:
Dirk Pranke, dpranke
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a GN assert preventing android templates in non-default toolchain Android templates have never been tested in non-default toolchains, and should never be necessary since java is not toolchain-dependent. BUG=none Committed: https://crrev.com/09d787e26cac78497700f700c31361099bf9071a Cr-Commit-Position: refs/heads/master@{#403963}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M build/config/android/config.gni View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2121833002/1
4 years, 5 months ago (2016-07-04 19:21:16 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-04 21:14:45 UTC) #4
agrieve
On 2016/07/04 21:14:45, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 5 months ago (2016-07-05 16:09:49 UTC) #7
Dirk Pranke
Sure, seems reasonable to see if we can enforce this. lgtm.
4 years, 5 months ago (2016-07-06 18:17:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2121833002/1
4 years, 5 months ago (2016-07-06 18:22:11 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-06 22:36:21 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-06 22:36:43 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/09d787e26cac78497700f700c31361099bf9071a Cr-Commit-Position: refs/heads/master@{#403963}
4 years, 5 months ago (2016-07-06 22:39:59 UTC) #16
michaelbai
On 2016/07/06 22:39:59, commit-bot: I haz the power wrote: > Patchset 1 (id:??) landed as ...
4 years, 5 months ago (2016-07-11 19:10:41 UTC) #17
agrieve
On 2016/07/11 19:10:41, michaelbai wrote: > On 2016/07/06 22:39:59, commit-bot: I haz the power wrote: ...
4 years, 5 months ago (2016-07-11 19:27:30 UTC) #18
agrieve
On 2016/07/11 19:27:30, agrieve wrote: > On 2016/07/11 19:10:41, michaelbai wrote: > > On 2016/07/06 ...
4 years, 5 months ago (2016-07-11 19:31:23 UTC) #19
agrieve
4 years, 5 months ago (2016-07-11 19:32:06 UTC) #20
Message was sent while issue was closed.
On 2016/07/11 19:31:23, agrieve wrote:
> On 2016/07/11 19:27:30, agrieve wrote:
> > On 2016/07/11 19:10:41, michaelbai wrote:
> > > On 2016/07/06 22:39:59, commit-bot: I haz the power wrote:
> > > > Patchset 1 (id:??) landed as
> > > > https://crrev.com/09d787e26cac78497700f700c31361099bf9071a
> > > > Cr-Commit-Position: refs/heads/master@{#403963}
> > > 
> > > This assert seemed not feasible in current situation, from my
understanding,
> > gn
> > > still need to pass the whole gn file for non-default toolchain, as long as
> the
> > > BUILD.gn file has java related feature, it will fail with "Unknown
> function",
> > > e.g. the patch https://codereview.chromium.org/2138163002 will got below
> error
> > > if I disable enable_java_templates for non-default toolchain
> > > 
> > > ERROR at //chrome/android/BUILD.gn:46:1: Unknown function.
> > > jinja_template("chrome_public_apk_manifest") {
> > > ^-------------
> > > See //chrome/android/BUILD.gn:484:7: which caused the file to be included.
> > >       ":monochrome($android_secondary_abi_toolchain)",
> > >       ^----------------------------------------------
> > > 
> > > 
> > > To fix this issue, we need to split native and java in BUILD.gn or use
> > > enable_java_templates to guard java specific code, if we really want to do
> > this,
> > > it seems a big refactoring.
> > 
> > I think the thing to do here is to either put the android rules behind if
> > (current_toolchain == default_toolchain) {}, or as you say - put them in a
> > separate file. Probably the if() would be better.
> 
> Hmm, maybe I didn't quite grasp what you are saying.... Is it the case that
> monochrome requires native libraries in a lot of build files? If so then yeah,
> more of a problem then I at first thought... Feel free to revert this added
> assertion if it's not an easy fix.

E.g. we could move it to be a build-time check by moving it to
write_build_config.py

Powered by Google App Engine
This is Rietveld 408576698