OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//printing/features/features.gni") | 7 import("//printing/features/features.gni") |
8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
9 import("//third_party/skia/gn/shared_sources.gni") | 9 import("//third_party/skia/gn/shared_sources.gni") |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' | 186 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' |
187 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). | 187 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). |
188 "/wd4341", # signed value is out of range for enum constant. | 188 "/wd4341", # signed value is out of range for enum constant. |
189 "/wd4345", # Object is default-initialized if initialization is omitted. | 189 "/wd4345", # Object is default-initialized if initialization is omitted. |
190 "/wd4390", # ';'empty statement found in looping;is it what was intended? | 190 "/wd4390", # ';'empty statement found in looping;is it what was intended? |
191 "/wd4554", # 'operator' : check operator precedence for possible error | 191 "/wd4554", # 'operator' : check operator precedence for possible error |
192 "/wd4748", # compiler will disable optimizations if a function has inline | 192 "/wd4748", # compiler will disable optimizations if a function has inline |
193 # assembly code contains flow control(jmp or jcc) statements. | 193 # assembly code contains flow control(jmp or jcc) statements. |
194 | 194 |
195 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool). | 195 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool). |
196 | |
197 "/wd4752", # We use AVX but don't let the compiler do so itself. | |
198 # See crbug.com/666707. | |
196 ] | 199 ] |
197 } | 200 } |
198 } | 201 } |
199 | 202 |
200 component("skia") { | 203 component("skia") { |
201 sources = [ | 204 sources = [ |
202 # Chrome sources. | 205 # Chrome sources. |
203 "config/SkUserConfig.h", | 206 "config/SkUserConfig.h", |
204 "config/sk_ref_cnt_ext_debug.h", | 207 "config/sk_ref_cnt_ext_debug.h", |
205 "config/sk_ref_cnt_ext_release.h", | 208 "config/sk_ref_cnt_ext_release.h", |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 visibility = [ ":skia_opts" ] | 546 visibility = [ ":skia_opts" ] |
544 configs -= [ "//build/config/compiler:chromium_code" ] | 547 configs -= [ "//build/config/compiler:chromium_code" ] |
545 configs += [ | 548 configs += [ |
546 ":skia_config", | 549 ":skia_config", |
547 ":skia_library_config", | 550 ":skia_library_config", |
548 "//build/config/compiler:no_chromium_code", | 551 "//build/config/compiler:no_chromium_code", |
549 ] | 552 ] |
550 } | 553 } |
551 source_set("skia_opts_avx") { | 554 source_set("skia_opts_avx") { |
552 sources = skia_opts.avx_sources | 555 sources = skia_opts.avx_sources |
553 if (!is_win) { | 556 if (!is_win || is_clang) { |
554 cflags = [ "-mavx" ] | 557 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
| |
555 } | 558 } |
556 if (is_win) { | 559 if (is_win) { |
557 cflags = [ "/arch:AVX" ] | 560 defines = [ "SK_CPU_SSE_LEVEL=51" ] |
558 } | 561 } |
559 visibility = [ ":skia_opts" ] | 562 visibility = [ ":skia_opts" ] |
560 configs -= [ "//build/config/compiler:chromium_code" ] | 563 configs -= [ "//build/config/compiler:chromium_code" ] |
561 configs += [ | 564 configs += [ |
562 ":skia_config", | 565 ":skia_config", |
563 ":skia_library_config", | 566 ":skia_library_config", |
564 "//build/config/compiler:no_chromium_code", | 567 "//build/config/compiler:no_chromium_code", |
565 ] | 568 ] |
566 } | 569 } |
567 source_set("skia_opts_hsw") { | 570 source_set("skia_opts_hsw") { |
568 sources = skia_opts.hsw_sources | 571 sources = skia_opts.hsw_sources |
569 if (!is_win) { | 572 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
| |
570 cflags = [ | 573 cflags = [ |
571 "-mavx2", | 574 "-mavx2", |
572 "-mbmi", | 575 "-mbmi", |
573 "-mbmi2", | 576 "-mbmi2", |
574 "-mf16c", | 577 "-mf16c", |
575 "-mfma", | 578 "-mfma", |
576 ] | 579 ] |
577 } | 580 } |
578 if (is_win) { | 581 if (is_win) { |
579 cflags = [ "/arch:AVX2" ] | 582 defines = [ "SK_CPU_SSE_LEVEL=52" ] |
580 } | 583 } |
581 visibility = [ ":skia_opts" ] | 584 visibility = [ ":skia_opts" ] |
582 configs -= [ "//build/config/compiler:chromium_code" ] | 585 configs -= [ "//build/config/compiler:chromium_code" ] |
583 configs += [ | 586 configs += [ |
584 ":skia_config", | 587 ":skia_config", |
585 ":skia_library_config", | 588 ":skia_library_config", |
586 "//build/config/compiler:no_chromium_code", | 589 "//build/config/compiler:no_chromium_code", |
587 ] | 590 ] |
588 } | 591 } |
589 } | 592 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
726 | 729 |
727 deps = [ | 730 deps = [ |
728 ":skia", | 731 ":skia", |
729 "//base", | 732 "//base", |
730 "//base/test:test_support", | 733 "//base/test:test_support", |
731 "//build/config/sanitizers:deps", | 734 "//build/config/sanitizers:deps", |
732 "//build/win:default_exe_manifest", | 735 "//build/win:default_exe_manifest", |
733 ] | 736 ] |
734 } | 737 } |
735 } | 738 } |
OLD | NEW |