win: Don't use rsp files when compiling gn. Compile command lines are pretty short; even chromium doens't need rsp files for them. Makes the build a tiny bit faster because rsp files are written by ninja on the critical path, and makes the build a bit easier to work with since it's now easier to copy-paste failing compile commands. While here, also remove some needless braces, to make the file more similar to linux/mac. No intended behavior change. Change-Id: I696b0f8d8b911e76cd5cde3c0e331375e2a766f1 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/6441 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
diff --git a/build/build_win.ninja.template b/build/build_win.ninja.template index 3edfb6a..60c970f 100644 --- a/build/build_win.ninja.template +++ b/build/build_win.ninja.template
@@ -1,25 +1,21 @@ rule cc - command = ninja -t msvc -- $cc /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out} - description = CC ${out} - rspfile = ${out}.rsp - rspfile_content = ${defines} ${includes} ${cflags} ${cflags_c} + command = ninja -t msvc -- $cc /nologo /showIncludes /FC $defines $includes $cflags $cflags_c /c $in /Fo$out + description = CC $out deps = msvc rule cxx - command = ninja -t msvc -- $cxx /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out} - description = CXX ${out} - rspfile = ${out}.rsp - rspfile_content = ${defines} ${includes} ${cflags} ${cflags_cc} + command = ninja -t msvc -- $cxx /nologo /showIncludes /FC $defines $includes $cflags $cflags_cc /c $in /Fo$out + description = CXX $out deps = msvc rule alink_thin - command = ninja -t msvc -- $ar /nologo /ignore:4221 /OUT:${out} @${out}.rsp - description = LIB ${out} - rspfile = ${out}.rsp - rspfile_content = ${in_newline} ${libflags} + command = ninja -t msvc -- $ar /nologo /ignore:4221 /OUT:$out @$out.rsp + description = LIB $out + rspfile = $out.rsp + rspfile_content = $in_newline $libflags rule link - command = ninja -t msvc -- $ld /nologo /OUT:${out} /PDB:${out}.pdb @${out}.rsp - description = LINK ${out} - rspfile = ${out}.rsp - rspfile_content = ${in_newline} ${libs} ${solibs} ${ldflags} + command = ninja -t msvc -- $ld /nologo /OUT:$out /PDB:$out.pdb @$out.rsp + description = LINK $out + rspfile = $out.rsp + rspfile_content = $in_newline $libs $solibs $ldflags