From 3eb71216d2fb70114417ae8ee9b0c5f5dc650704 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 11 Oct 2016 17:08:53 -0400 Subject: [PATCH] More steps toward GN/Windows. 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 Commit-Queue: Mike Klein --- BUILD.gn | 40 ++++++++++++++++++++++++++++------------ gn/BUILD.gn | 9 ++++++++- third_party/icu/BUILD.gn | 4 +++- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 41536e8..75b2055 100644 --- 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") { diff --git a/gn/BUILD.gn b/gn/BUILD.gn index a098a22..7dc8f47 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -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" diff --git a/third_party/icu/BUILD.gn b/third_party/icu/BUILD.gn index e7a55b5..9342c8f 100644 --- a/third_party/icu/BUILD.gn +++ b/third_party/icu/BUILD.gn @@ -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", -- 2.7.4