Closed Bug 731384 Opened 9 years ago Closed 9 years ago

[Skia] Fix compile errors under older versions of clang

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: Irving, Assigned: Irving)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #688333 +++

The version of clang shipped with XCode 4.0.x (for OS X 10.6) does not support the "override" keyword used in Skia header files:


In file included from /Users/ireid/tbird/comm-central/mozilla/gfx/2d/Factory.cpp:46:
In file included from /Users/ireid/tbird/comm-central/mozilla/gfx/2d/DrawTargetSkia.h:40:
In file included from ../../dist/include/skia/SkCanvas.h:17:
In file included from ../../dist/include/skia/SkPaint.h:14:
../../dist/include/skia/SkXfermode.h:209:44: error: expected ';' at end of declaration list
                        const SkAlpha aa[]) SK_OVERRIDE;
                                           ^


Clang documentation recommends using feature test macros to detect whether new features are available: http://clang.llvm.org/docs/LanguageExtensions.html#cxx_override_control
Patch with feature tests to fix compile errors on Xcode 4.0.x
Attachment #601386 - Flags: review?(matt.woodrow)
Comment on attachment 601386 [details] [diff] [review]
Use clang feature test macros to define override only if supported by the clang version in use

Review of attachment 601386 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good, but you need to create a patch file and include it in update.sh so that we don't lose this during skia updates
Added patch file and modified update.sh so that the change will be applied to new Skia imports.
Attachment #601386 - Attachment is obsolete: true
Attachment #603833 - Flags: review?(matt.woodrow)
Attachment #601386 - Flags: review?(matt.woodrow)
Attachment #603833 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/4f5cda91bd03
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.