clang/win: Make everything work in a GN build.

Do this by removing the default_warnings config, moving the flags in there to a
variable, and use it in both the chromium_code and no_chromium_code configs.

If a target does

    configs -= [ "//build/config/compiler:chromium_code" ]
    configs += [ "//build/config/compiler:no_chromium_code" ]

this would add no_chromium_code to the end of configs previously, and the
-Wno-foo flags in default_warnings would be passed before the /W3 flag in
no_chromium_code (and /W3 would then override some of the -Wno-foo flags).
By moving the flags into no_chromium_code, they're guaranteed to appear
after /W3 (and after -Wall on POSIX).

See also thread "configs and warning cflag ordering" on gn-dev:
https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/qkqdlwtcQW4

In a similar vein, move a -Wno-foo flag in skia/BUILD.gn into a config, to make sure
it appears at the end of the compile command.

While here, also remove /wd4267 from skia's BUILD.gn, it's already passed globally
(this part doesn't change behavior).

(clang-cl working with gn also needs an ffmpeg roll to pick up
https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/5eb7926d25142b65d77be3706ff8bd8116a9d150
This is blocked on http://crbug.com/496975)

BUG=491209
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

Review URL: https://codereview.chromium.org/1151303006

Cr-Original-Commit-Position: refs/heads/master@{#333380}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0bfa8a8a759697b140ef2a18f058513ec8485a57
1 file changed
tree: 83581c0862d1e4fcb0ce468fad1c8c3ff8770e34
  1. tools/