Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Issue 437543007: Refactor how clang warning flags are set. (Closed)

Created:
6 years, 4 months ago by Nico
Modified:
6 years, 4 months ago
Reviewers:
hans, scottmg
CC:
chromium-reviews, scottmg
Project:
chromium
Visibility:
Public.

Description

Refactor how clang warning flags are set. Previously, every gyp file that wanted to set clang warnings had to check for clang==1 and then set cflags and xcode_settings.WARNING_CFLAGS. Factor this out, so that targets only need to set clang_warning_flags for warnings that apply to all platforms. (Per-platform flags still need to be set manually.) This removes existing duplication from gyp files, and prevents adding more duplication when trying to add the same warning flags for clang/win. BUG=82385 R=hans@chromium.org, scottmg@chromium.org TBR=various owners Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287092

Patch Set 1 #

Patch Set 2 : unset #

Patch Set 3 : add #

Patch Set 4 : . #

Patch Set 5 : rebase #

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -198 lines) Patch
M breakpad/breakpad.gyp View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M breakpad/breakpad_tools.gypi View 1 2 3 4 5 6 1 chunk +3 lines, -6 lines 0 comments Download
M build/common.gypi View 1 2 3 4 4 chunks +34 lines, -71 lines 0 comments Download
A build/set_clang_warning_flags.gypi View 1 2 3 1 chunk +44 lines, -0 lines 1 comment Download
M skia/skia_chrome.gypi View 1 2 chunks +7 lines, -13 lines 0 comments Download
M skia/skia_common.gypi View 1 2 3 4 5 1 chunk +5 lines, -0 lines 3 comments Download
M skia/skia_library.gypi View 1 2 3 4 5 1 chunk +0 lines, -12 lines 0 comments Download
M third_party/libxml/libxml.gyp View 2 chunks +15 lines, -21 lines 0 comments Download
M third_party/libxslt/libxslt.gyp View 1 2 3 4 5 6 1 chunk +6 lines, -11 lines 0 comments Download
M third_party/mesa/mesa.gyp View 1 2 chunks +9 lines, -19 lines 0 comments Download
M third_party/snappy/snappy.gyp View 1 2 3 4 5 4 chunks +11 lines, -14 lines 3 comments Download
M third_party/sqlite/sqlite.gyp View 1 2 chunks +8 lines, -14 lines 0 comments Download
M third_party/zlib/zlib.gyp View 1 2 3 4 5 2 chunks +6 lines, -11 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Nico
Look at build/common.gypi and build/set_clang_warning_flags.gypi first, the rest is mechanical. There's a ton of this ...
6 years, 4 months ago (2014-08-01 20:56:08 UTC) #1
scottmg
https://codereview.chromium.org/437543007/diff/110001/build/set_clang_warning_flags.gypi File build/set_clang_warning_flags.gypi (right): https://codereview.chromium.org/437543007/diff/110001/build/set_clang_warning_flags.gypi#newcode11 build/set_clang_warning_flags.gypi:11: # warn instead! Maybe consider calling this file set_clang_warnings_flags_third_party ...
6 years, 4 months ago (2014-08-01 21:00:14 UTC) #2
scottmg
Oh, oops, it's already via common.gypi, ignore last comment. lgtm
6 years, 4 months ago (2014-08-01 21:00:38 UTC) #3
Nico
The CQ bit was checked by thakis@chromium.org
6 years, 4 months ago (2014-08-01 21:08:50 UTC) #4
Nico
The CQ bit was unchecked by thakis@chromium.org
6 years, 4 months ago (2014-08-01 21:11:42 UTC) #5
Nico
The CQ bit was checked by thakis@chromium.org
6 years, 4 months ago (2014-08-01 21:11:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/437543007/110001
6 years, 4 months ago (2014-08-01 21:12:10 UTC) #7
hans
Nice! lgtm with comment https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp File third_party/snappy/snappy.gyp (right): https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp#newcode84 third_party/snappy/snappy.gyp:84: 'clang_warning_flags': [ 'Wno-return-type' ], There's ...
6 years, 4 months ago (2014-08-01 21:23:29 UTC) #8
Nico
https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp File third_party/snappy/snappy.gyp (right): https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp#newcode84 third_party/snappy/snappy.gyp:84: 'clang_warning_flags': [ 'Wno-return-type' ], On 2014/08/01 21:23:29, hans wrote: ...
6 years, 4 months ago (2014-08-01 21:25:06 UTC) #9
Nico
https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp File third_party/snappy/snappy.gyp (right): https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp#newcode84 third_party/snappy/snappy.gyp:84: 'clang_warning_flags': [ 'Wno-return-type' ], On 2014/08/01 21:23:29, hans wrote: ...
6 years, 4 months ago (2014-08-01 21:35:20 UTC) #10
Nico
On 2014/08/01 21:35:20, Nico (away) wrote: > https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp > File third_party/snappy/snappy.gyp (right): > > https://codereview.chromium.org/437543007/diff/110001/third_party/snappy/snappy.gyp#newcode84 ...
6 years, 4 months ago (2014-08-01 21:44:36 UTC) #11
Nico
Committed patchset #7 manually as r287092 (presubmit successful).
6 years, 4 months ago (2014-08-01 21:48:31 UTC) #12
hans
https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi File skia/skia_common.gypi (right): https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi#newcode143 skia/skia_common.gypi:143: '-Wstring-conversion', I just noticed this: it looks like this ...
6 years, 4 months ago (2014-08-14 21:11:02 UTC) #13
Nico
https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi File skia/skia_common.gypi (right): https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi#newcode143 skia/skia_common.gypi:143: '-Wstring-conversion', On 2014/08/14 21:11:02, hans wrote: > I just ...
6 years, 4 months ago (2014-08-14 21:15:35 UTC) #14
scottmg
https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi File skia/skia_common.gypi (right): https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi#newcode143 skia/skia_common.gypi:143: '-Wstring-conversion', On 2014/08/14 21:15:35, Nico (very away) wrote: > ...
6 years, 4 months ago (2014-08-14 21:18:10 UTC) #15
hans
6 years, 4 months ago (2014-08-14 21:40:01 UTC) #16
Message was sent while issue was closed.
On 2014/08/14 21:15:35, Nico (very away) wrote:
> https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi
> File skia/skia_common.gypi (right):
> 
>
https://codereview.chromium.org/437543007/diff/110001/skia/skia_common.gypi#n...
> skia/skia_common.gypi:143: '-Wstring-conversion',
> On 2014/08/14 21:11:02, hans wrote:
> > I just noticed this: it looks like this is adding a warning, not uppressing
> it.
> > How does that work?
> 
> That looks wrong, it should've probably been clang_warning_flags_unset . Looks
> like this isn't needed anymore, then?

I suspect something isn't right here (I'm trying to suppress another warning,
but it's not working).

I added -foo-bar here (and in skia/skia_chromium.gypi), re-gyp'ed and built the
"skia" target without any complaints. It seems like these flags aren't getting
used?

Powered by Google App Engine
This is Rietveld 408576698