From 96aa535b782f31df0f063213c2958acba32a808d Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Tue, 19 Jun 2018 10:34:32 -0400 Subject: Remove .bat and .exe from commands where possible. We expect .BAT and .EXE to be on PATHEXT. Also, although Python CreateProcess doesn't honor PATHEXT, it will try .EXE. This allows most commands to be platform-independent, and also resolves the issue with the cpython package not including python.bat. No-Tree-Checks: true Docs-Preview: https://skia.org/?cl=135626 Bug: chromium:852581 Change-Id: Iab4189407df44ff4ad4d37da07ff52414229d397 Reviewed-on: https://skia-review.googlesource.com/135626 Commit-Queue: Ben Wagner Auto-Submit: Ben Wagner Reviewed-by: Eric Boren Reviewed-by: Mike Klein --- gn/toolchain/BUILD.gn | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gn/toolchain') diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn index 1c0c2dc56a..6229e45ee9 100644 --- a/gn/toolchain/BUILD.gn +++ b/gn/toolchain/BUILD.gn @@ -23,10 +23,8 @@ declare_args() { } if (host_os == "win") { - python = "python.bat" stamp = "cmd.exe /c echo >" } else { - python = "python" stamp = "touch" } @@ -180,7 +178,7 @@ toolchain("msvc") { tool("copy") { cp_py = rebase_path("../cp.py") - command = "$python $cp_py {{source}} {{output}}" + command = "python $cp_py {{source}} {{output}}" description = "copy {{source}} {{output}}" } } @@ -247,7 +245,7 @@ template("gcc_like_toolchain") { rspfile = "{{output}}.rsp" rspfile_content = "{{inputs}}" ar_py = rebase_path("../ar.py") - command = "$python $ar_py $ar {{output}} $rspfile" + command = "python $ar_py $ar {{output}} $rspfile" outputs = [ "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", ] @@ -292,13 +290,13 @@ template("gcc_like_toolchain") { tool("copy") { cp_py = rebase_path("../cp.py") - command = "$python $cp_py {{source}} {{output}}" + command = "python $cp_py {{source}} {{output}}" description = "copy {{source}} {{output}}" } tool("copy_bundle_data") { cp_py = rebase_path("../cp.py") - command = "$python $cp_py {{source}} {{output}}" + command = "python $cp_py {{source}} {{output}}" description = "copy_bundle_data {{source}} {{output}}" } -- cgit v1.2.3