Add an SkOpts target for Haswell+ Intel chips.

Haswell brought a whole slew of handy new instructions for us (AVX2, FMA, BMI1+BMI2) and also feature F16C, which came one generation earlier on Ivybridge.  We work with integers often enough that we really want to target AVX2 instead of AVX, and this means it's pretty practical to ask for all those other goodies along with it.

Chrome's GN files and Google3's BUILD file will need an update, before or after this CL.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2840
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I826daf77b5104664c5d31ddaabee347e287b87a2
Reviewed-on: https://skia-review.googlesource.com/2840
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 53f49ec..c138492 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -197,6 +197,18 @@
   cflags = [ "-mavx" ]
 }
 
+opts("hsw") {
+  enabled = is_x86
+  sources = skia_opts.hsw_sources
+  cflags = [
+    "-mavx2",
+    "-mbmi",
+    "-mbmi2",
+    "-mf16c",
+    "-mfma",
+  ]
+}
+
 opts("dsp") {
   enabled = current_cpu == "mipsel"
   sources = skia_opts.mips_dsp_sources
@@ -440,6 +452,7 @@
     ":fontmgr_fuchsia",
     ":gif",
     ":gpu",
+    ":hsw",
     ":jpeg",
     ":none",
     ":pdf",