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

Issue 1717573002: ozone: Fix the way platform tests link ozone (Closed)

Created:
4 years, 10 months ago by spang
Modified:
4 years, 10 months ago
Reviewers:
rjkroege
CC:
chromium-reviews, kalyank, ozone-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ozone: Fix the way platform tests link ozone Right now the DRM platform unit tests link ozone as a component, and also link against the platform classes statically. Linking two copies of the platform code into the test executable is an ODR violation and undefined behavior. The newer wayland platform fixes the issue, but at the cost of exporting platform internals from ozone. It'd be good to avoid these exports because it forces us to mark the platform dependency public in GN, which in turn makes inclusion of platform internals legal from outside ozone according to GN's dependency checker. To fix both issues, this creates an new internal //ui/ozone:platform target which is used by tests to link ozone statically. Only tests will use it, everyone else will continue to use ozone encapsulated via the //ui/ozone component. GYP can do this as well but has a weird quirk: it won't link if there's no C++ source file in the component target. I added an empty one. Committed: https://crrev.com/4dc16f302df8ff9a5fa9fd819cd6e85fbe1835ce Cr-Commit-Position: refs/heads/master@{#376823}

Patch Set 1 #

Total comments: 2

Patch Set 2 : add comment to empty.cc #

Patch Set 3 : typofix #

Total comments: 1

Patch Set 4 : exists #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -21 lines) Patch
M ui/ozone/BUILD.gn View 3 chunks +19 lines, -6 lines 0 comments Download
A + ui/ozone/empty.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ui/ozone/ozone.gyp View 2 chunks +14 lines, -4 lines 0 comments Download
M ui/ozone/platform/drm/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/drm/gbm.gypi View 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/wayland/BUILD.gn View 1 chunk +2 lines, -1 line 0 comments Download
M ui/ozone/platform/wayland/wayland.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/wayland/wayland_display.h View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/ozone/platform/wayland/wayland_surface_factory.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/ozone/platform/wayland/wayland_window.h View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
spang
on top of https://codereview.chromium.org/1716543003/
4 years, 10 months ago (2016-02-19 05:20:35 UTC) #2
rjkroege
https://codereview.chromium.org/1717573002/diff/1/ui/ozone/empty.cc File ui/ozone/empty.cc (left): https://codereview.chromium.org/1717573002/diff/1/ui/ozone/empty.cc#oldcode5 ui/ozone/empty.cc:5: namespace blink { The purpose of this file needs ...
4 years, 10 months ago (2016-02-19 19:06:32 UTC) #4
spang
https://codereview.chromium.org/1717573002/diff/1/ui/ozone/empty.cc File ui/ozone/empty.cc (left): https://codereview.chromium.org/1717573002/diff/1/ui/ozone/empty.cc#oldcode5 ui/ozone/empty.cc:5: namespace blink { On 2016/02/19 19:06:32, rjkroege wrote: > ...
4 years, 10 months ago (2016-02-22 19:42:55 UTC) #5
rjkroege
lgtm https://codereview.chromium.org/1717573002/diff/40001/ui/ozone/empty.cc File ui/ozone/empty.cc (right): https://codereview.chromium.org/1717573002/diff/40001/ui/ozone/empty.cc#newcode5 ui/ozone/empty.cc:5: // This empty source file exist to force ...
4 years, 10 months ago (2016-02-22 20:28:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1717573002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1717573002/60001
4 years, 10 months ago (2016-02-22 21:08:23 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-22 22:09:08 UTC) #11
commit-bot: I haz the power
4 years, 10 months ago (2016-02-22 22:11:06 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4dc16f302df8ff9a5fa9fd819cd6e85fbe1835ce
Cr-Commit-Position: refs/heads/master@{#376823}

Powered by Google App Engine
This is Rietveld 408576698