Index: third_party/libvpx/BUILD.gn |
diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn |
index 0a39291205bad7fd39e8e76cba5f5b9b9b47199a..25b95a2d781f026483ac1b43c852c858497b5d2a 100644 |
--- a/third_party/libvpx/BUILD.gn |
+++ b/third_party/libvpx/BUILD.gn |
@@ -38,9 +38,9 @@ if (is_nacl) { |
# vpx_config.asm |
if (is_ios && current_cpu == "arm") { |
os_category = current_os |
- } else if (is_posix) { # Should cover linux, mac, and the ios simulator. |
+ } else if (is_posix) { # Should cover linux, mac, and the ios simulator. |
os_category = "linux" |
- } else { # This should only match windows. |
+ } else { # This should only match windows. |
os_category = current_os |
} |
platform_include_dir = |
@@ -180,7 +180,13 @@ if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { |
configs += [ "//build/config/compiler:no_chromium_code" ] |
configs += [ ":libvpx_warnings" ] |
if (is_win) { |
- cflags = [ "/arch:AVX" ] |
+ if (is_clang) { |
+ cflags = [ "/arch:AVX" ] |
+ } else { |
+ # /arch:AVX leads to ODR violations in CRT functions that are inline but |
+ # not inlined. crbug.com/666707 |
+ cflags = [ "/wd4752" ] |
+ } |
} else { |
cflags = [ "-mavx" ] |
} |
@@ -197,7 +203,13 @@ if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { |
configs += [ "//build/config/compiler:no_chromium_code" ] |
configs += [ ":libvpx_warnings" ] |
if (is_win) { |
- cflags = [ "/arch:AVX2" ] |
+ if (is_clang) { |
+ cflags = [ "/arch:AVX2" ] |
+ } else { |
+ # /arch:AVX leads to ODR violations in CRT functions that are inline but |
+ # not inlined. crbug.com/666707 |
+ cflags = [ "/wd4752" ] |
+ } |
} else { |
cflags = [ "-mavx2" ] |
} |