[chromium] When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors
Created attachment 118899 [details] Patch
Builds on my Linux machine, I need to test on Mac before landing. Related: http://trac.webkit.org/changeset/96881
Comment on attachment 118899 [details] Patch FWIW, exit time destructors are already enabled by 67 'variables': { 'enable_wexit_time_destructors': 1, }, in WebKit.gyp. Mac doesn't look at 'cflags', but instead looks at xcode_settings: { 'OTHER_CFLAGS': }, so if you want this to have an effect on the chromium/mac port you'd need that too. Thanks for doing this!
Created attachment 118904 [details] Patch
(In reply to comment #3) > (From update of attachment 118899 [details]) > Mac doesn't look at 'cflags', but instead looks at xcode_settings: { 'OTHER_CFLAGS': }, so if you want this to have an effect on the chromium/mac port you'd need that too. I ended up using WARNING_CFLAGS because that's what enable_wexit_time_destructors does. Let me know if that's the wrong way to do this.
Comment on attachment 118904 [details] Patch lgtm.
Created attachment 120052 [details] Patch
enable_wexit_time_destructors is already enabled everywhere so I removed that from this patch.
lgtm, but it's still blocked on sail's patch landing (it's in the commit queue right now).
I just tested building Chromium Mac and it passed with this patch. I verified from the output that -Wglobal-constructors is being passed on the compile line.
Committed r103727: <http://trac.webkit.org/changeset/103727>