We've got a global variable, sNativeRegionPool, that's part of libgkgfx on the Mac only. The variable is instantiated as NS_EXPORT which sets the visibility properly, but when building with compiler visibility support activated, a shared library build fails when linking libgfx_mac, which depends on libgkgfx and the sNativeRegionPool variable, because the symbol winds up not exported. The build log reveals: (while compiling mozilla/gfx/src/mac/nsRegionPool.cpp) .../mozilla/gfx/src/mac/nsRegionPool.cpp:41: warning: ‘sNativeRegionPool’: visibility attribute ignored because it .../mozilla/gfx/src/mac/nsRegionPool.h:66: warning: conflicts with previ ous declaration here The export attribute needs to be applied to the declaration (nsRegionPool.h:66) in order for it to be effective.
Created attachment 293909 [details] [diff] [review] Decorate with visibility at declaration This adds NS_EXPORT to the declaration, which allows sNativeRegionPool to be exported from libgkgfx, so that libgfx_mac and any other users can find it. This code is not built on the trunk, which has moved on to Cairo gfx. This change is needed on the branch to support the hidden-visibility Camino build for Camino 1.6. It's completely safe on the branch, as NS_EXPORT always sets default visibility on all current 1.8-branch builds on the Mac. This change is a no-op as far as all existing 1.8-branch builds are concerned: we do not use hidden visibility at all on the 1.8 branch on the Mac.
Attachment #293909 - Flags: review?(ted.mielczarek)
Attachment #293909 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 293909 [details] [diff] [review] Decorate with visibility at declaration Requesting approval1.9 for the trunk. Even though this is no longer built on the trunk since the switch to cairo gfx, I'll keep it synchronized until the old gfx source is removed from cvs. Requesting approval188.8.131.52 for the MOZILLA_1_8_BRANCH. This change has no impact on any existing 1.8 branch build, because symbols are always exported on the Mac on all existing 1.8 branch builds.
Comment on attachment 293909 [details] [diff] [review] Decorate with visibility at declaration a=beltzner for 1.9
Attachment #293909 - Flags: approval1.9? → approval1.9+
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Comment on attachment 293909 [details] [diff] [review] Decorate with visibility at declaration approved for 184.108.40.206, a=dveditz for release-drivers
Attachment #293909 - Flags: approval220.127.116.11? → approval18.104.22.168+
Checked in on MOZILLA_1_8_BRANCH.
Status: RESOLVED → VERIFIED
Keywords: fixed22.214.171.124 → verified126.96.36.199
You need to log in before you can comment on or make changes to this bug.