Closed
Bug 682066
Opened 13 years ago
Closed 13 years ago
Fix build with clang
Categories
(Toolkit Graveyard :: Build Config, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla9
People
(Reporter: espindola, Assigned: espindola)
Details
Attachments
(4 files)
9.14 KB,
patch
|
Details | Diff | Splinter Review | |
671 bytes,
patch
|
Details | Diff | Splinter Review | |
1.81 KB,
patch
|
benjamin
:
review+
khuey
:
feedback+
|
Details | Diff | Splinter Review |
54.45 KB,
text/plain
|
Details |
One difference from clang to gcc is that clang uses the regparam attribute as part of the type when deciding which template specialization to use. This in intentional (see http://llvm.org/pr10735). A consequence for us is in nsRunnableMethodTraits. We have a specialization for plain methods and one for __stdcall (I assume because VC behaves like clang?). We are missing one with NS_DEFCALL. One way to fix this is to just add another specialization with an ifdef for clang. Another option is to avoid using that template with these methods. The attached patch implements the second option.
Attachment #555816 -
Flags: review?(mh+mozilla)
Updated•13 years ago
|
Attachment #555816 -
Flags: review?(mh+mozilla) → review?(gavin.sharp)
Comment 1•13 years ago
|
||
Comment on attachment 555816 [details] [diff] [review] add nostdcall to some methods I don't know enough about this to review.
Attachment #555816 -
Flags: review?(gavin.sharp) → review?(benjamin)
Assignee | ||
Comment 2•13 years ago
|
||
This patch also fixes the build. I am OK with both.
Attachment #556060 -
Flags: review?(khuey)
Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 556060 [details] [diff] [review] alternative patch Actually, this bug fails on x86_64: #if defined(__i386__) && defined(__GNUC__) && \ (__GNUC__ >= 3) && !defined(XP_OS2) #define NS_DEFCALL __attribute__ ((regparm (0), cdecl)) #else #define NS_DEFCALL #endif I can be extended to work, but I think the other patch is better now.
Attachment #556060 -
Flags: review?(khuey)
Assignee | ||
Updated•13 years ago
|
Attachment #555816 -
Flags: review?(benjamin) → review?(khuey)
Comment on attachment 555816 [details] [diff] [review] add nostdcall to some methods We discussed a better approach on IRC.
Attachment #555816 -
Flags: review?(khuey)
Assignee | ||
Comment 5•13 years ago
|
||
There are more cleanups to be done, but this is sufficient to fix the build, so I will send the rest as follow up patches/bugs.
Assignee | ||
Comment 6•13 years ago
|
||
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=1783df1a7824
Comment on attachment 556588 [details] [diff] [review] drop NS_DEFCALL I think this is fine, but I'd like somebody with some more institutional memory to sign off on it.
Attachment #556588 -
Flags: review?(khuey)
Attachment #556588 -
Flags: review?(benjamin)
Attachment #556588 -
Flags: feedback+
Assignee | ||
Comment 8•13 years ago
|
||
Updated•13 years ago
|
Attachment #556588 -
Flags: review?(benjamin) → review+
Comment 9•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/7fa469f47cbb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Updated•6 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•