GN: Fix Windows Clang errors
BUG=webrtc:6255 NOTRY=True Review-Url: https://codereview.webrtc.org/2274713005 Cr-Commit-Position: refs/heads/master@{#13919}
This commit is contained in:
parent
3f746ea26a
commit
4bc4d2747b
1
.gn
1
.gn
@ -47,6 +47,7 @@ exec_script_whitelist = [
|
||||
"//build/config/mac/mac_sdk.gni",
|
||||
"//build/config/posix/BUILD.gn",
|
||||
"//build/config/sysroot.gni",
|
||||
"//build/config/win/BUILD.gn",
|
||||
"//build/config/win/visual_studio_version.gni",
|
||||
"//build/gn_helpers.py",
|
||||
"//build/gypi_to_gn.py",
|
||||
|
||||
26
third_party/winsdk_samples/BUILD.gn
vendored
26
third_party/winsdk_samples/BUILD.gn
vendored
@ -10,9 +10,7 @@ if (is_win) {
|
||||
baseclasses_dir = "src/Samples/multimedia/directshow/baseclasses"
|
||||
|
||||
config("winsdk_samples_config") {
|
||||
include_dirs = [
|
||||
baseclasses_dir,
|
||||
]
|
||||
include_dirs = [ baseclasses_dir ]
|
||||
}
|
||||
|
||||
static_library("winsdk_samples") {
|
||||
@ -87,5 +85,25 @@ if (is_win) {
|
||||
"//build/config/win:nominmax",
|
||||
]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
if (is_win && is_clang) {
|
||||
cflags += [
|
||||
# Disable warnings failing when compiling with Clang on Windows.
|
||||
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
||||
"-Wno-comment",
|
||||
"-Wno-delete-non-virtual-dtor",
|
||||
"-Wno-ignored-attributes",
|
||||
"-Wno-logical-op-parentheses",
|
||||
"-Wno-non-pod-varargs",
|
||||
"-Wno-microsoft-extra-qualification",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-overloaded-virtual",
|
||||
"-Wno-parentheses",
|
||||
"-Wno-reorder",
|
||||
"-Wno-string-conversion",
|
||||
"-Wno-tautological-constant-out-of-range-compare",
|
||||
"-Wno-unused-private-field",
|
||||
"-Wno-writable-strings",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,6 +508,15 @@ static_library("rtc_base") {
|
||||
"win32socketserver.h",
|
||||
]
|
||||
}
|
||||
if (is_win && is_clang) {
|
||||
cflags += [
|
||||
# Disable warnings failing when compiling with Clang on Windows.
|
||||
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-missing-braces",
|
||||
]
|
||||
}
|
||||
|
||||
if (rtc_build_json) {
|
||||
deps += [ "//third_party/jsoncpp" ]
|
||||
} else {
|
||||
|
||||
@ -415,6 +415,14 @@ if (is_linux || is_win) {
|
||||
cflags = [ "/wd4245" ]
|
||||
configs += [ "//build/config/win:windowed" ]
|
||||
}
|
||||
if (is_win && is_clang) {
|
||||
cflags = [
|
||||
# Disable warnings failing when compiling with Clang on Windows.
|
||||
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
||||
"-Wno-reorder",
|
||||
"-Wno-unused-function",
|
||||
]
|
||||
}
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
"peerconnection/client/linux/main.cc",
|
||||
|
||||
@ -279,7 +279,7 @@ if (rtc_include_tests) {
|
||||
# TODO(kjellander): Make the code compile without disabling these flags.
|
||||
# See https://bugs.webrtc.org/3307.
|
||||
if (is_clang && is_win) {
|
||||
cflags += [ "-Wno-unused-function" ]
|
||||
cflags = [ "-Wno-unused-function" ]
|
||||
}
|
||||
if (!is_win) {
|
||||
cflags = [ "-Wno-sign-compare" ]
|
||||
|
||||
@ -193,6 +193,23 @@ source_set("audio_device") {
|
||||
"msdmo.lib",
|
||||
]
|
||||
}
|
||||
if (is_win && is_clang) {
|
||||
cflags += [
|
||||
# Disable warnings failing when compiling with Clang on Windows.
|
||||
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
||||
"-Wno-bool-conversion",
|
||||
"-Wno-delete-non-virtual-dtor",
|
||||
"-Wno-logical-op-parentheses",
|
||||
"-Wno-microsoft-extra-qualification",
|
||||
"-Wno-microsoft-goto",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-parentheses-equality",
|
||||
"-Wno-reorder",
|
||||
"-Wno-shift-overflow",
|
||||
"-Wno-tautological-compare",
|
||||
"-Wno-unused-private-field",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
|
||||
|
||||
@ -136,6 +136,17 @@ if (!build_with_chromium) {
|
||||
|
||||
deps += [ "//third_party/winsdk_samples" ]
|
||||
}
|
||||
if (is_win && is_clang) {
|
||||
cflags = [
|
||||
"-Wno-comment",
|
||||
"-Wno-ignored-attributes",
|
||||
"-Wno-microsoft-extra-qualification",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-overloaded-virtual",
|
||||
"-Wno-reorder",
|
||||
"-Wno-writable-strings",
|
||||
]
|
||||
}
|
||||
if (is_ios) {
|
||||
sources = [
|
||||
"ios/device_info_ios.h",
|
||||
|
||||
@ -417,7 +417,7 @@ config("test_renderer_exported_config") {
|
||||
# GN orders flags on a target before flags from configs. The default config
|
||||
# adds -Wall, and this flag have to be after -Wall -- so they need to
|
||||
# come from a config and cannot be on the target directly.
|
||||
cflags += [
|
||||
cflags = [
|
||||
"-Wno-bool-conversion",
|
||||
"-Wno-comment",
|
||||
"-Wno-delete-non-virtual-dtor",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user