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

Unified Diff: skia/BUILD.gn

Issue 2518473003: Avoid /arch:AVX[2] in Skia on Windows. (Closed)
Patch Set: || is_clang 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: 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" ]
« 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