WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74365
[chromium] When building with clang, enable -Wglobal-constructors
https://bugs.webkit.org/show_bug.cgi?id=74365
Summary
[chromium] When building with clang, enable -Wglobal-constructors
Tony Chang
Reported
2011-12-12 16:01:34 PST
[chromium] When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors
Attachments
Patch
(2.45 KB, patch)
2011-12-12 16:02 PST
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(2.81 KB, patch)
2011-12-12 16:35 PST
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(2.69 KB, patch)
2011-12-20 11:58 PST
,
Tony Chang
abarth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tony Chang
Comment 1
2011-12-12 16:02:29 PST
Created
attachment 118899
[details]
Patch
Tony Chang
Comment 2
2011-12-12 16:03:24 PST
Builds on my Linux machine, I need to test on Mac before landing. Related:
http://trac.webkit.org/changeset/96881
Nico Weber
Comment 3
2011-12-12 16:09:06 PST
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!
Tony Chang
Comment 4
2011-12-12 16:35:59 PST
Created
attachment 118904
[details]
Patch
Tony Chang
Comment 5
2011-12-12 16:37:01 PST
(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.
Nico Weber
Comment 6
2011-12-12 16:38:24 PST
Comment on
attachment 118904
[details]
Patch lgtm.
Tony Chang
Comment 7
2011-12-20 11:58:48 PST
Created
attachment 120052
[details]
Patch
Tony Chang
Comment 8
2011-12-20 11:59:19 PST
enable_wexit_time_destructors is already enabled everywhere so I removed that from this patch.
Nico Weber
Comment 9
2011-12-20 12:05:42 PST
lgtm, but it's still blocked on sail's patch landing (it's in the commit queue right now).
Tony Chang
Comment 10
2011-12-27 13:50:27 PST
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.
Tony Chang
Comment 11
2011-12-27 14:04:29 PST
Committed
r103727
: <
http://trac.webkit.org/changeset/103727
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug