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

Issue 2888763005: [boringssl] Use all_dependent_configs for external_config (Closed)

Created:
3 years, 7 months ago by bcf
Modified:
3 years, 7 months ago
Reviewers:
agl, davidben, Ryan Sleevi, mattm
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[boringssl] Use all_dependent_configs for external_config Without this config, transitive dependencies of boringssl may fail to build. BUG=internal b/37998486 TEST=build

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M third_party/boringssl/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
bcf
The alternative to this is to have transitive dependencies manually depend on boringssl, but I ...
3 years, 7 months ago (2017-05-17 20:09:48 UTC) #3
bcf
This issue popped up for us on our Android builds after this change: https://codereview.chromium.org/2855783002/patch/20001/30001
3 years, 7 months ago (2017-05-17 20:11:00 UTC) #4
davidben
I do not believe this is correct. This means that something is failing to depend ...
3 years, 7 months ago (2017-05-17 20:35:32 UTC) #6
davidben
To clarify this a bit, the commit message says that, without this, if A depends ...
3 years, 7 months ago (2017-05-17 20:38:26 UTC) #7
bcf
On 2017/05/17 20:38:26, davidben wrote: > To clarify this a bit, the commit message says ...
3 years, 7 months ago (2017-05-17 20:49:27 UTC) #8
davidben
On 2017/05/17 20:49:27, bcf wrote: > On 2017/05/17 20:38:26, davidben wrote: > > To clarify ...
3 years, 7 months ago (2017-05-17 20:59:19 UTC) #9
davidben
On 2017/05/17 20:59:19, davidben wrote: > On 2017/05/17 20:49:27, bcf wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-17 21:06:52 UTC) #10
mattm
On 2017/05/17 21:06:52, davidben wrote: > On 2017/05/17 20:59:19, davidben wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-17 21:19:55 UTC) #11
davidben
On 2017/05/17 21:19:55, mattm wrote: > On 2017/05/17 21:06:52, davidben wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-17 21:21:31 UTC) #12
davidben
On 2017/05/17 21:21:31, davidben wrote: > On 2017/05/17 21:19:55, mattm wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-18 21:31:41 UTC) #13
bcf
3 years, 7 months ago (2017-05-18 21:38:14 UTC) #14
On 2017/05/18 21:31:41, davidben wrote:
> On 2017/05/17 21:21:31, davidben wrote:
> > On 2017/05/17 21:19:55, mattm wrote:
> > > On 2017/05/17 21:06:52, davidben wrote:
> > > > On 2017/05/17 20:59:19, davidben wrote:
> > > > > On 2017/05/17 20:49:27, bcf wrote:
> > > > > > On 2017/05/17 20:38:26, davidben wrote:
> > > > > > > To clarify this a bit, the commit message says that, without this,
> if
> > A
> > > > > > depends
> > > > > > > on B depends on //third_party/boringssl, A needs a dependency to
> > > > > > > //third_party/boringssl. This is only true if A pulls in BoringSSL
> > > headers
> > > > > (in
> > > > > > > which case the dependency is correct) or if B's public headers
pull
> in
> > > > > > > //third_party/boringssl headers. That means B must list
> > > > > > //third_party/boringssl
> > > > > > > in its public_deps which will cause //third_party/boringssl's
> > > > public_config
> > > > > to
> > > > > > > get pulled into A.
> > > > > > 
> > > > > > That would mean everything which transitively depends on B needs to
> > expose
> > > > > > public_deps, which seems nonideal.
> > > > > 
> > > > > I don't follow. The rule is:
> > > > > 
> > > > > 1. If A includes B in its public headers, B goes in A's public_deps.
> > > > > 2. If A includes B, but only in private source files, B goes in A's
> deps.
> > > > > 
> > > > > This is by design how GN is intended to work. Our buildsystem isn't as
> > nice
> > > as
> > > > > bazel as far as enforcing this goes, which is why problems tend to
only
> > show
> > > > up
> > > > > on funny #includes like //third_party/boringssl.
> > > > 
> > > > Hrm, actually, playing around with gn check, it looks like it only
notices
> > > > direct includes. Let me check with the GN folks. It's possible I have
this
> > > > backwards.
> > > 
> > > Your description sounded correct to me. I dunno about gn check.
> > > 
> > > 
> > > My method for fixing this was just: go through the include chain, find
where
> > > some file in target A is including some header from target B which
includes
> > > something from target C, but target B doesn't have a public_deps on target
> C.
> > > Add the public_dep. Repeat until compile succeeds.
> > 
> > Well, having something only get enforced by compile failures rather than gn
> > check isn't great. Poking through the source tree, I see examples of
> > header-paired settings being put in both public_configs and
> > all_dependent_configs, so it seems we're inconsistent. I'll start a thread
> with
> > gn-dev@ to find out what the intent was and CC you two.
> 
> Sounds like the GN folks agree with this interpretation.

Yes, I'll go ahead and do the public_dep approach.

Powered by Google App Engine
This is Rietveld 408576698