From c722f79b6c8919e1a8a0df6d4d7735c5a8a1b5e8 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 31 Jul 2017 11:57:21 -0400 Subject: clang on windows support 1) Run python bin/fetch-clang-win 2) Set clang_win = "../bin/clang_win" 3) ??? 4) Profit Most changes here are to pass the right -mfoo flags to Clang to enable advanced instruction sets, or fixed warning-as-errors. BUG=skia:2679 Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921 Reviewed-on: https://skia-review.googlesource.com/28740 Reviewed-by: Ben Wagner Commit-Queue: Mike Klein --- gn/toolchain/BUILD.gn | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gn/toolchain') diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn index c5b13107c5..14a8a91965 100644 --- a/gn/toolchain/BUILD.gn +++ b/gn/toolchain/BUILD.gn @@ -50,6 +50,13 @@ toolchain("msvc") { } } + if (clang_win != "") { + cl = "$clang_win/bin/clang-cl.exe" + } else { + cl = "$bin/cl.exe" + } + + tool("asm") { _ml = "ml" if (target_cpu == "x64") { @@ -68,7 +75,7 @@ toolchain("msvc") { pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" # Label names may have spaces so pdbname must be quoted. - command = "$env_setup$bin/cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" + command = "$env_setup$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" depsformat = "msvc" outputs = [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", @@ -83,7 +90,7 @@ toolchain("msvc") { pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" # Label names may have spaces so pdbname must be quoted. - command = "$env_setup$bin/cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" + command = "$env_setup$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" depsformat = "msvc" outputs = [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", -- cgit v1.2.3