Index: skia/BUILD.gn |
diff --git a/skia/BUILD.gn b/skia/BUILD.gn |
index c0e296e5fa2f5b3cec2d49e617db10f37f28bdce..1d39c5ce71faa27764a1cf4f614e2a72c3e3a5b3 100644 |
--- a/skia/BUILD.gn |
+++ b/skia/BUILD.gn |
@@ -193,6 +193,9 @@ config("skia_library_config") { |
# assembly code contains flow control(jmp or jcc) statements. |
"/wd4800", # forcing value to bool 'true/false'(assigning int to bool). |
+ |
+ "/wd4752", # We use AVX but don't let the compiler do so itself. |
+ # See crbug.com/666707. |
] |
} |
} |
@@ -550,11 +553,11 @@ if (!skia_build_no_opts) { |
} |
source_set("skia_opts_avx") { |
sources = skia_opts.avx_sources |
- if (!is_win) { |
+ if (!is_win || is_clang) { |
cflags = [ "-mavx" ] |
brucedawson
2016/11/18 21:00:26
It feels odd to use -mavx on a Windows build, but
mtklein_C
2016/11/18 21:03:56
Yeah. It's the only way to express things like -m
|
} |
if (is_win) { |
- cflags = [ "/arch:AVX" ] |
+ defines = [ "SK_CPU_SSE_LEVEL=51" ] |
} |
visibility = [ ":skia_opts" ] |
configs -= [ "//build/config/compiler:chromium_code" ] |
@@ -566,7 +569,7 @@ if (!skia_build_no_opts) { |
} |
source_set("skia_opts_hsw") { |
sources = skia_opts.hsw_sources |
- if (!is_win) { |
+ if (!is_win || is_clang) { |
brucedawson
2016/11/18 21:00:26
This may have unintended consequences because now
mtklein_C
2016/11/18 21:03:56
Hmm. I think it should be okay, especially becaus
|
cflags = [ |
"-mavx2", |
"-mbmi", |
@@ -576,7 +579,7 @@ if (!skia_build_no_opts) { |
] |
} |
if (is_win) { |
- cflags = [ "/arch:AVX2" ] |
+ defines = [ "SK_CPU_SSE_LEVEL=52" ] |
} |
visibility = [ ":skia_opts" ] |
configs -= [ "//build/config/compiler:chromium_code" ] |