Workaround as much as possible to be able to build with Clang on Mac OS X

RESOLVED FIXED

Status

Firefox Build System
General
RESOLVED FIXED
8 years ago
3 months ago

People

(Reporter: Nomis101, Unassigned)

Tracking

Trunk
x86
Windows 7

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

8 years ago
This Bug is for keeping a patch to workaround as much as possible issues in Mozilla code to be able to build with Clang, until this issues are fixed.
The initial patch is from: http://llvm.org/bugs/show_bug.cgi?id=5511
(Reporter)

Comment 1

8 years ago
Created attachment 480389 [details] [diff] [review]
Workaround patch v1

This patch works with the current trunk from 2. October. I've got this patch from John Regehr and added a hack to workaround an issue with jsgcinlines.h
This patch also includes the fixes for Bug 579788, Bug 579786 and Bug 583460.
(Reporter)

Comment 3

8 years ago
(In reply to comment #2)
> How is this bug different from bug 574346?

Bug 574346 is a tracking Bug. This Bug is for hosting a patch that is partly a hack and not a fix, so the issues in /widgets/cocoa can be fixed. See https://bugzilla.mozilla.org/show_bug.cgi?id=583460#c7
OS: Mac OS X → Windows 7
(Reporter)

Comment 4

8 years ago
Created attachment 480796 [details] [diff] [review]
Workaround patch v2

+ 600901 and 600900.
Attachment #480389 - Attachment is obsolete: true
(Reporter)

Updated

8 years ago
OS: Windows 7 → Mac OS X

Comment 5

8 years ago
Comment on attachment 480796 [details] [diff] [review]
Workaround patch v2

>   const nsDefaultStringComparator defaultComparator;
>-  const nsASCIICaseInsensitiveStringComparator ciComparator;
>+  const nsASCIICaseInsensitiveStringComparator ciComparator = nsASCIICaseInsensitiveStringComparator();
Out of interest, why doesn't the default comparator need an explicit initialiser?
(Reporter)

Comment 6

8 years ago
(In reply to comment #5)
> Comment on attachment 480796 [details] [diff] [review]
> Workaround patch v2
> 
> >   const nsDefaultStringComparator defaultComparator;
> >-  const nsASCIICaseInsensitiveStringComparator ciComparator;
> >+  const nsASCIICaseInsensitiveStringComparator ciComparator = nsASCIICaseInsensitiveStringComparator();
> Out of interest, why doesn't the default comparator need an explicit
> initialiser?

I have only copied this from llvm Bug 5511. If you are interested in details for this patch, its better to ask Eli Friedman who has written this lines. I only can say, that Clang doesn't produce an error for this.
OS: Mac OS X → Windows 7
Can we close this bug? I think 574346 is tracking all that we need and with newer clangs we shouldn't need any workaround.
(Reporter)

Comment 8

7 years ago
Yes, you are right. We can close this, because its not needed anymore.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

3 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.