More steps toward GN/Windows.
authorMike Klein <mtklein@chromium.org>
Tue, 11 Oct 2016 21:08:53 +0000 (17:08 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 11 Oct 2016 21:31:19 +0000 (21:31 +0000)
I think I'm now at the point of needing to just resolve missing symbols.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3201

Change-Id: Ib908bd72c23f2d4bafd17182eedcb2fc85c422e5
Reviewed-on: https://skia-review.googlesource.com/3201
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

BUILD.gn
gn/BUILD.gn
third_party/icu/BUILD.gn

index 41536e8..75b2055 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -182,43 +182,59 @@ opts("crc32") {
 opts("sse2") {
   enabled = is_x86
   sources = skia_opts.sse2_sources
-  cflags = [ "-msse2" ]
+  if (!is_win) {
+    cflags = [ "-msse2" ]
+  }
 }
 
 opts("ssse3") {
   enabled = is_x86
   sources = skia_opts.ssse3_sources
-  cflags = [ "-mssse3" ]
+  if (!is_win) {
+    cflags = [ "-mssse3" ]
+  }
 }
 
 opts("sse41") {
   enabled = is_x86
   sources = skia_opts.sse41_sources
-  cflags = [ "-msse4.1" ]
+  if (!is_win) {
+    cflags = [ "-msse4.1" ]
+  }
 }
 
 opts("sse42") {
   enabled = is_x86
   sources = skia_opts.sse42_sources
-  cflags = [ "-msse4.2" ]
+  if (!is_win) {
+    cflags = [ "-msse4.2" ]
+  }
 }
 
 opts("avx") {
   enabled = is_x86
   sources = skia_opts.avx_sources
-  cflags = [ "-mavx" ]
+  if (is_win) {
+    cflags = [ "/arch:AVX" ]
+  } else {
+    cflags = [ "-mavx" ]
+  }
 }
 
 opts("hsw") {
   enabled = is_x86
   sources = skia_opts.hsw_sources
-  cflags = [
-    "-mavx2",
-    "-mbmi",
-    "-mbmi2",
-    "-mf16c",
-    "-mfma",
-  ]
+  if (is_win) {
+    cflags = [ "/arch:AVX2" ]
+  } else {
+    cflags = [
+      "-mavx2",
+      "-mbmi",
+      "-mbmi2",
+      "-mf16c",
+      "-mfma",
+    ]
+  }
 }
 
 opts("dsp") {
index a098a22..7dc8f47 100644 (file)
@@ -55,10 +55,15 @@ config("default") {
     ]
     include_dirs = [
       "$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
-      "$windk/../Windows Kits/8.1/Include/um",
       "$windk/../Windows Kits/8.1/Include/shared",
+      "$windk/../Windows Kits/8.1/Include/um",
       "$windk/VC/include",
     ]
+    lib_dirs = [
+      "$windk/../Windows Kits/10/Lib/10.0.10150.0/ucrt/x64",
+      "$windk/../Windows Kits/8.1/Lib/winv6.3/um/x64",
+      "$windk/VC/lib/amd64",
+    ]
   } else {
     cflags += [
       "-O1",
@@ -294,6 +299,8 @@ config("executable") {
 }
 
 toolchain("msvc") {
+  lib_dir_switch = "/LIBPATH:"
+
   cl_exe = "$windk/VC/bin/amd64/cl.exe"
   link_exe = "$windk/VC/bin/amd64/link.exe"
   lib_exe = "$windk/VC/bin/amd64/lib.exe"
index e7a55b5..9342c8f 100644 (file)
@@ -11,7 +11,9 @@ import("../third_party.gni")
 third_party("icu") {
   public_include_dirs = [ "../externals/icu/source/common" ]
   configs -= [ "//gn:no_rtti" ]
-  libs = [ "dl" ]
+  if (!is_win) {
+    libs = [ "dl" ]
+  }
   defines = [
     # http://userguide.icu-project.org/howtouseicu
     "U_COMMON_IMPLEMENTATION",