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

Unified Diff: third_party/libvpx/BUILD.gn

Issue 2516703002: Remove /arch:AVX and /arch:AVX2 from libvpx (Closed)
Patch Set: Reenable /arch:AVX* for clang-cl, and mandatory gn format??? Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" ]
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698