Fix non-unified-build bustage in layout/generic
Categories
(Core :: Layout, task)
Tracking
()
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file, 3 external files)
|
5.43 KB,
text/plain
|
Details |
(This is the same as Bug 1730741, but for layout/generic.)
We now have this mozconfig option to disable unification:
ac_add_options --disable-unified-build
layout/generic is currently exempt from respecting this build flag, via its moz.build REQUIRES_UNIFIED_BUILD = True declaration.
I'm filing this bug on removing that declaration and fixing the build bustage that results from that.
| Assignee | ||
Comment 1•5 years ago
|
||
The first build error that I'm fixing here is a bunch of variants of this which are fixed by a one-line change:
In file included from $SRC/layout/generic/ReflowOutput.cpp:9:
In file included from $OBJ/dist/include/mozilla/ReflowOutput.h:12:
$OBJ/dist/include/mozilla/EnumeratedRange.h:194:3: error: use of undeclared identifier 'MOZ_ASSERT'
MOZ_ASSERT(end != std::numeric_limits<EnumUnderlyingType>::max(),
^
$OBJ/dist/include/mozilla/gfx/Types.h:860:19: note: in instantiation of
function template specialization 'mozilla::MakeInclusiveEnumeratedRange<mozilla::Side>' requested here
return mozilla::MakeInclusiveEnumeratedRange(eSideTop, eSideLeft);
^
(There are many more copies of this build error for other files/usages.)
This is just an indication that mfbt/EnumeratedRange.h needs to include Assertions.h, so that it's not imposing that non-obvious requirement on all of the files that use it.
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 3•5 years ago
|
||
Without this patch, these MOZ_ASSERT statements cause build errors, if I build
the layout/generic directory in non-unified mode.
(Instead of this patch, we could also hypothetically sprinkle individual
#includes for Assertions.h around to all the downstream files; but it's simpler
and more direct to just put it here in the file that contains the MOZ_ASSERT
statements in question. Note that many other MFBT headers also have includes
for Assertions.h, so it seems reasonable to include it here as well.)
| Assignee | ||
Comment 4•5 years ago
|
||
After the fixes in this patch, the REQUIRES_UNIFIED_BUILD declaration is no
longer needed, so I'm removing it here. This directory now builds successfully
with that removed and with ac_add_options --disable-unified-build in the
mozconfig.
Depends on D125610
| Assignee | ||
Updated•5 years ago
|
Comment 7•5 years ago
•
|
||
Backed out for causing bustages on Bp-hybrid. CLOSED TREE
Backout link : https://hg.mozilla.org/integration/autoland/rev/0a0c233b154d5d6b0eb7e3751d7733988f469bee
Push with failures : https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&collapsedPushes=842382&resultStatus=success%2Cpending%2Crunning%2Ctestfailed%2Cbusted%2Cexception&searchStr=hybrid&revision=007ff7f371c95f82439b3a75aa73edb4b3cfd89c
Link to failure log : https://treeherder.mozilla.org/logviewer?job_id=351589792&repo=autoland
Comment 8•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•5 years ago
|
||
Looks like there are some linking errors in the non-unified configuration, which I didn't run into locally, for some reason.
I'll take a look later on today.
| Assignee | ||
Comment 10•5 years ago
|
||
The linking errors are:
ld.lld: error: undefined hidden symbol: mozilla::dom::Document::GetBodyElement()
>>> referenced by nsIFrame.cpp:630 (/builds/worker/checkouts/gecko/layout/generic/nsIFrame.cpp:630)
>>> /builds/worker/workspace/obj-build/toolkit/library/gtest/../../../layout/generic/nsIFrame.o:(nsIFrame::IsPrimaryFrameOfRootOrBodyElement() const)
ld.lld: error: undefined hidden symbol: nsIFrame::IsFlexItem() const
>>> referenced by nsImageFrame.cpp:244 (/builds/worker/checkouts/gecko/layout/generic/nsImageFrame.cpp:244)
>>> /builds/worker/workspace/obj-build/toolkit/library/gtest/../../../layout/generic/nsImageFrame.o:(nsImageFrame::Reflow(nsPresContext*, mozilla::ReflowOutput&, mozilla::ReflowInput const&, nsReflowStatus&))
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 11•5 years ago
|
||
I'm relanding part 2 without the moz.build tweak right now, and I'll bundle that tweak into the fix for the linker issue, in a later patch here.
| Assignee | ||
Updated•5 years ago
|
Comment 12•5 years ago
|
||
| Assignee | ||
Comment 13•5 years ago
|
||
(I suspect those linker issues are indications that we need to include DocumentInlines.h and nsIFrameInlines.h, respectively. That's where the inline functions in question are defined.)
| Assignee | ||
Comment 14•5 years ago
|
||
Try with hopefully-complete 'part 3' (which I'll submit to phabricator if it passes): https://treeherder.mozilla.org/jobs?repo=try&revision=b6e7aa4e84cebc23c0853d4ad41f13ec89c2d624
| Assignee | ||
Comment 15•5 years ago
|
||
After the fixes in this patch, the REQUIRES_UNIFIED_BUILD declaration is no
longer needed, so I'm removing it here. This directory now builds successfully
with that removed and with ac_add_options --disable-unified-build in the
mozconfig.
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Description
•