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

Issue 987483003: MacViews: gyp change for building MacViews browser. (Closed)

Created:
5 years, 9 months ago by Andre
Modified:
5 years, 9 months ago
Reviewers:
tapted, Nico, sky
CC:
chromium-reviews, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: gyp change for building MacViews browser. For mac_views_browser we currently compile as if for Cocoa+toolkit_views then remove both views files that are not ready, and cocoa files that conflict with things already ported. More of views compiles on Mac now than doesn't (but isn't ready to go into a release build). This change moves those ready files back to non_mac_sources for now. There are too many doubly defined functions that we risk linking a Views one into the shipping Cocoa binary. Then, for mac_views_browser, we add all the "non_mac" views files and just remove the cocoa files that would conflict. BUG=425229 Committed: https://crrev.com/9fb4cc5797107bd9ae266879e8c0b4d2d17c8e3a Cr-Commit-Position: refs/heads/master@{#319533}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Fixes for Trent #

Patch Set 3 : Update GN #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -120 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 2 chunks +24 lines, -19 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 13 chunks +100 lines, -101 lines 2 comments Download

Messages

Total messages: 21 (8 generated)
Andre
Trent, WDYT? Here we compile Views only when mac_views_browser is 1. I think there are ...
5 years, 9 months ago (2015-03-06 00:43:57 UTC) #5
tapted
Yep, I think it's a good idea, but it needs some rationale in the CL ...
5 years, 9 months ago (2015-03-06 02:38:57 UTC) #6
Andre
Thanks! https://codereview.chromium.org/987483003/diff/60001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (right): https://codereview.chromium.org/987483003/diff/60001/chrome/chrome_browser_ui.gypi#newcode1846 chrome/chrome_browser_ui.gypi:1846: # Cross-platform views sources for all desktop platforms. ...
5 years, 9 months ago (2015-03-06 18:34:39 UTC) #7
Andre
sky@, PTAL. toolkit_views=1 mac_views_browser is close to building. It should actually build with this change ...
5 years, 9 months ago (2015-03-06 18:36:46 UTC) #9
sky
LGTM
5 years, 9 months ago (2015-03-06 19:30:48 UTC) #10
tapted
lgtm
5 years, 9 months ago (2015-03-06 22:47:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/987483003/100001
5 years, 9 months ago (2015-03-06 22:52:16 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:100001)
5 years, 9 months ago (2015-03-07 00:16:31 UTC) #15
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/9fb4cc5797107bd9ae266879e8c0b4d2d17c8e3a Cr-Commit-Position: refs/heads/master@{#319533}
5 years, 9 months ago (2015-03-07 00:17:25 UTC) #16
Nico
https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (left): https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi#oldcode2979 chrome/chrome_browser_ui.gypi:2979: 'browser/ui/views/task_manager_view.cc', This isn't good: Now both task_manager_mac and task_manager_view ...
5 years, 9 months ago (2015-03-24 21:55:11 UTC) #18
tapted
https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (left): https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi#oldcode2979 chrome/chrome_browser_ui.gypi:2979: 'browser/ui/views/task_manager_view.cc', On 2015/03/24 21:55:11, Nico wrote: > This isn't ...
5 years, 9 months ago (2015-03-25 14:01:21 UTC) #19
Nico
On 2015/03/25 14:01:21, tapted (travelling) wrote: > https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi > File chrome/chrome_browser_ui.gypi (left): > > https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_ui.gypi#oldcode2979 ...
5 years, 9 months ago (2015-03-25 17:02:59 UTC) #20
Andre
5 years, 9 months ago (2015-03-25 17:41:35 UTC) #21
Message was sent while issue was closed.
On 2015/03/25 17:02:59, Nico wrote:
> On 2015/03/25 14:01:21, tapted (travelling) wrote:
> >
>
https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_u...
> > File chrome/chrome_browser_ui.gypi (left):
> > 
> >
>
https://codereview.chromium.org/987483003/diff/100001/chrome/chrome_browser_u...
> > chrome/chrome_browser_ui.gypi:2979: 'browser/ui/views/task_manager_view.cc',
> > On 2015/03/24 21:55:11, Nico wrote:
> > > This isn't good: Now both task_manager_mac and task_manager_view get
> compiled
> > > in, and both define `chrome::ShowTaskManager(Browser*)`, which gives us an
> ODR
> > > violation.
> > 
> > Wow you're right - do you have a secret way of detecting this, or are you
just
> > using your thakis superpowers?
> > 
> > I'm amazed this isn't picked up at link time. It looks like it's pruning
> > task_manager_view.cc completely, but we obviously can't depend on that.
> 
> The way static libraries work is that for each unresolved symbol, the linker
> loads the .o from the .a that defines that symbol, until everything's defined.
> If nothing pulls in both .o files, there's no symbol conflict. (And there's
none
> during .a construction because dupe symbols are actually pretty common, for
> inline functions).
> https://plus.google.com/101038813433650812235/posts/fTuNakqTjGh has some more
> details on this.
> 
> One way to find this is to add -Wl,-all_load to your linker flags. This forces
> the linker to load all .o files from .a files. Another way is to have your
> target be a source_set in gn. source_sets are just a collection of .o files,
not
> a .a file, so everything gets loaded. (I once had a gyp patch that turned all
> static_libraries effectively into source_sets under the covers; patching that
in
> would also repro this – but I can't find that right now.) Yet another way is
to
> try and build chrome with LTO, which is how I came across this.
> 
> Anyhoo, please fix :-)
> 
> > E.g. commenting out ShowTaskManager() in task_manager_mac.mm gives a symbol
> > collision on Hide now that "something" in task_manager_view.cc is needed.
> > 
> > duplicate symbol __ZN6chrome15HideTaskManagerEv in:
> >     libbrowser_ui.a(browser_ui.task_manager_mac.o)
> >     libbrowser_ui.a(browser_ui.task_manager_view.o)

Thanks for catching this, Nico.
I'm working on a fix in http://crrev.com/1003323005.

Powered by Google App Engine
This is Rietveld 408576698