diff options
author | Brian Osman <brianosman@google.com> | 2017-10-23 12:13:14 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-23 16:34:29 +0000 |
commit | 9dd4ae1a7a1c188267af3e05ec5408ae6fe22326 (patch) | |
tree | 8df521f47101eb41f7eac4ea14addd0e9a1c077b | |
parent | 30578893c5111c32b8e8812957c55508a813a629 (diff) |
Support cc_wrapper with MSVC toolchain
Bug: skia:
Change-Id: I0433105c4a0e064e5cc228b7f6bec1ef3c66909c
Reviewed-on: https://skia-review.googlesource.com/62744
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
-rw-r--r-- | gn/BUILD.gn | 5 | ||||
-rw-r--r-- | gn/toolchain/BUILD.gn | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn index db8f8345d2..9d6952af4a 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -288,6 +288,11 @@ config("warnings") { "/wd4291", # no matching operator delete found; # memory will not be freed if initialization throws an exception ] + if (is_clang) { + # Shouldn't be necessary for local builds. With distributed builds, files may lose + # their case during copy, causing case-sensitivity mismatch on remote machines. + cflags += [ "-Wno-nonportable-include-path" ] + } } else { cflags += [ "-Wall", diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn index 7f2f2c9db7..13c8397032 100644 --- a/gn/toolchain/BUILD.gn +++ b/gn/toolchain/BUILD.gn @@ -61,7 +61,7 @@ toolchain("msvc") { if (target_cpu == "x64") { _ml += "64" } - command = "$env_setup$bin/$_ml.exe /nologo /c /Fo {{output}} {{source}}" + command = "$env_setup $bin/$_ml.exe /nologo /c /Fo {{output}} {{source}}" outputs = [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", ] @@ -74,7 +74,7 @@ toolchain("msvc") { pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" # Label names may have spaces so pdbname must be quoted. - command = "$env_setup$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" + command = "$env_setup $cc_wrapper \"$cl\" /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" depsformat = "msvc" outputs = [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", @@ -89,7 +89,7 @@ toolchain("msvc") { pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" # Label names may have spaces so pdbname must be quoted. - command = "$env_setup$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" + command = "$env_setup $cc_wrapper \"$cl\" /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" depsformat = "msvc" outputs = [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", @@ -101,7 +101,7 @@ toolchain("msvc") { tool("alink") { rspfile = "{{output}}.rsp" - command = "$env_setup$bin/lib.exe /nologo /ignore:4221 {{arflags}} /OUT:{{output}} @$rspfile" + command = "$env_setup $bin/lib.exe /nologo /ignore:4221 {{arflags}} /OUT:{{output}} @$rspfile" outputs = [ # Ignore {{output_extension}} and always use .lib, there's no reason to # allow targets to override this extension on Windows. @@ -121,7 +121,7 @@ toolchain("msvc") { pdbname = "${dllname}.pdb" rspfile = "${dllname}.rsp" - command = "$env_setup$bin/link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile" + command = "$env_setup $bin/link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile" outputs = [ dllname, libname, @@ -151,7 +151,7 @@ toolchain("msvc") { rspfile = "$exename.rsp" command = - "$env_setup$bin/link.exe /nologo /OUT:$exename /PDB:$pdbname @$rspfile" + "$env_setup $bin/link.exe /nologo /OUT:$exename /PDB:$pdbname @$rspfile" default_output_extension = ".exe" default_output_dir = "{{root_out_dir}}" |