aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--gn/BUILD.gn1
2 files changed, 3 insertions, 2 deletions
diff --git a/BUILD.gn b/BUILD.gn
index f765cc43c9..ddbaf6598e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -250,7 +250,7 @@ opts("avx") {
enabled = is_x86
sources = skia_opts.avx_sources
if (is_win) {
- cflags = [ "/arch:AVX" ]
+ defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_AVX" ]
} else {
cflags = [ "-mavx" ]
}
@@ -260,7 +260,7 @@ opts("hsw") {
enabled = is_x86
sources = skia_opts.hsw_sources
if (is_win) {
- cflags = [ "/arch:AVX2" ]
+ defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_AVX2" ]
} else {
cflags = [
"-mavx2",
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 60dddffd40..4be4d977bf 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -261,6 +261,7 @@ config("warnings") {
"/wd4244", # conversion from 'float' to 'int', possible loss of data
"/wd4267", # conversion from 'size_t' to 'int', possible loss of data
"/wd4800", # forcing value to bool 'true' or 'false' (performance warning)
+ "/wd4752", # We use AVX but don't let the compiler do so itself. See crbug.com/666707.
# Probably only triggers when /EHsc is enabled.
"/wd4291", # no matching operator delete found;