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("//testing/test.gni") | 7 import("//testing/test.gni") |
8 import("//third_party/skia/gn/shared_sources.gni") | 8 import("//third_party/skia/gn/shared_sources.gni") |
9 | 9 |
10 if (current_cpu == "arm") { | 10 if (current_cpu == "arm") { |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 cflags = [ "/arch:AVX" ] | 553 cflags = [ "/arch:AVX" ] |
554 } | 554 } |
555 visibility = [ ":skia_opts" ] | 555 visibility = [ ":skia_opts" ] |
556 configs -= [ "//build/config/compiler:chromium_code" ] | 556 configs -= [ "//build/config/compiler:chromium_code" ] |
557 configs += [ | 557 configs += [ |
558 ":skia_config", | 558 ":skia_config", |
559 ":skia_library_config", | 559 ":skia_library_config", |
560 "//build/config/compiler:no_chromium_code", | 560 "//build/config/compiler:no_chromium_code", |
561 ] | 561 ] |
562 } | 562 } |
563 source_set("skia_opts_avx2") { | 563 source_set("skia_opts_hsw") { |
564 sources = skia_opts.avx2_sources | 564 sources = skia_opts.hsw_sources |
565 if (!is_win) { | 565 if (!is_win) { |
566 cflags = [ "-mavx2" ] | 566 cflags = [ |
| 567 "-mavx2", |
| 568 "-mbmi", |
| 569 "-mbmi2", |
| 570 "-mf16c", |
| 571 "-mfma", |
| 572 ] |
567 } | 573 } |
568 if (is_win) { | 574 if (is_win) { |
569 cflags = [ "/arch:AVX2" ] | 575 cflags = [ "/arch:AVX2" ] |
570 } | 576 } |
571 visibility = [ ":skia_opts" ] | 577 visibility = [ ":skia_opts" ] |
572 configs -= [ "//build/config/compiler:chromium_code" ] | 578 configs -= [ "//build/config/compiler:chromium_code" ] |
573 configs += [ | 579 configs += [ |
574 ":skia_config", | 580 ":skia_config", |
575 ":skia_library_config", | 581 ":skia_library_config", |
576 "//build/config/compiler:no_chromium_code", | 582 "//build/config/compiler:no_chromium_code", |
577 ] | 583 ] |
578 } | 584 } |
579 } | 585 } |
580 } | 586 } |
581 | 587 |
582 source_set("skia_opts") { | 588 source_set("skia_opts") { |
583 cflags = [] | 589 cflags = [] |
584 defines = [] | 590 defines = [] |
585 | 591 |
586 deps = [ | 592 deps = [ |
587 "//base", | 593 "//base", |
588 ] | 594 ] |
589 | 595 |
590 if (skia_build_no_opts) { | 596 if (skia_build_no_opts) { |
591 sources = skia_opts.none_sources | 597 sources = skia_opts.none_sources |
592 } else if (current_cpu == "x86" || current_cpu == "x64") { | 598 } else if (current_cpu == "x86" || current_cpu == "x64") { |
593 sources = skia_opts.sse2_sources | 599 sources = skia_opts.sse2_sources |
594 deps += [ | 600 deps += [ |
595 ":skia_opts_avx", | 601 ":skia_opts_avx", |
596 ":skia_opts_avx2", | 602 ":skia_opts_hsw", |
597 ":skia_opts_sse3", | 603 ":skia_opts_sse3", |
598 ":skia_opts_sse41", | 604 ":skia_opts_sse41", |
599 ":skia_opts_sse42", | 605 ":skia_opts_sse42", |
600 ] | 606 ] |
601 } else if (current_cpu == "arm") { | 607 } else if (current_cpu == "arm") { |
602 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 608 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
603 # ARM), the compiler doesn't like that. | 609 # ARM), the compiler doesn't like that. |
604 cflags += [ "-fomit-frame-pointer" ] | 610 cflags += [ "-fomit-frame-pointer" ] |
605 | 611 |
606 if (arm_version >= 7) { | 612 if (arm_version >= 7) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 | 722 |
717 deps = [ | 723 deps = [ |
718 ":skia", | 724 ":skia", |
719 "//base", | 725 "//base", |
720 "//base/test:test_support", | 726 "//base/test:test_support", |
721 "//build/config/sanitizers:deps", | 727 "//build/config/sanitizers:deps", |
722 "//build/win:default_exe_manifest", | 728 "//build/win:default_exe_manifest", |
723 ] | 729 ] |
724 } | 730 } |
725 } | 731 } |
OLD | NEW |