diff options
-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}}" |