|
|
Created:
4 years, 11 months ago by sof Modified:
4 years, 11 months ago CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis, dcheng, Nico, tasak Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix g++ builds by avoiding early HeapSupplement<Document> instantiation.
Building ToT with g++ (component build) currently breaks when using
the Oilpan type HeapSupplement<Document>:
...
error: type attributes ignored after type is already defined [-Werror=attributes]
...
.../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’
extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>;
It appears that g++ cannot be kept happy if it implicitly instantiates
a template at a type and then later sees an extern decl like the above
with some extra attributes attached.
Hence, bring the required types into scope for FontFaceSet's declaration
to avoid that unfortunate situation.
R=haraken,thakis
BUG=
Committed: https://crrev.com/6b5fd4d088d1eafe2f375a3b0f495aab26283cc0
Cr-Commit-Position: refs/heads/master@{#371270}
Patch Set 1 #
Messages
Total messages: 18 (7 generated)
sigbjornf@opera.com changed reviewers: + mostynb@opera.com, oilpan-reviews@chromium.org
please take a look. (Cc:ing dcheng, thakis + tasak who I believe have run up into similar compat toolchain issues in the past.)
Description was changed from ========== Fix g++ building by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R= BUG= ========== to ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R= BUG= ==========
thakis@chromium.org changed reviewers: + thakis@chromium.org
Huh, I thought usually the take-away is "don't use `extern template`". Isn't Document.h gigantic? Or am I confusing it with a different header? If it's that header, not being able to forward-declare Document would be a bit of a problem.
On 2016/01/25 15:52:15, Nico wrote: > Huh, I thought usually the take-away is "don't use `extern template`". Isn't > Document.h gigantic? Or am I confusing it with a different header? If it's that > header, not being able to forward-declare Document would be a bit of a problem. Document.h is a gigantic bundle of wax and it is fine to forward declare Document. Just not when you use it conjunction with HeapSupplement<>, like here. Says g++.
Some background: This CL is necessary to fix an issue caused by enabling Oilpan on ToT. To minimize the confusion on developers, I want to avoid reverting Oilpan as much as possible. So I'd be happy if you could approve this fix if it is not doing a wrong thing :)
g++ builds WFM again with this patch.
LGTM on my side.
lgtm to pacify compilers after the oilpan fix, but maybe there's a more structural long-term fix here
On 2016/01/25 17:22:23, Nico wrote: > lgtm to pacify compilers after the oilpan fix, but maybe there's a more > structural long-term fix here thanks, moving the "extern template" out of Document.h might be an alternative, but it feels unnatural. tasak@ may very well have some ideas.
Description was changed from ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R= BUG= ========== to ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R=haraken,thakis BUG= ==========
The CQ bit was checked by sigbjornf@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1634683002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1634683002/1
Message was sent while issue was closed.
Description was changed from ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R=haraken,thakis BUG= ========== to ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R=haraken,thakis BUG= ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R=haraken,thakis BUG= ========== to ========== Fix g++ builds by avoiding early HeapSupplement<Document> instantiation. Building ToT with g++ (component build) currently breaks when using the Oilpan type HeapSupplement<Document>: ... error: type attributes ignored after type is already defined [-Werror=attributes] ... .../dom/Document.h:179:51: note: in expansion of macro ‘WillBeHeapSupplement’ extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>; It appears that g++ cannot be kept happy if it implicitly instantiates a template at a type and then later sees an extern decl like the above with some extra attributes attached. Hence, bring the required types into scope for FontFaceSet's declaration to avoid that unfortunate situation. R=haraken,thakis BUG= Committed: https://crrev.com/6b5fd4d088d1eafe2f375a3b0f495aab26283cc0 Cr-Commit-Position: refs/heads/master@{#371270} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/6b5fd4d088d1eafe2f375a3b0f495aab26283cc0 Cr-Commit-Position: refs/heads/master@{#371270} |