Remove legacy ninja binaries

PSA has already been sent to internal/external devs.
Internal: http://g/chromium-dev-internal/n2IL0Mbh0E8
External: https://groups.google.com/a/chromium.org/g/chromium-dev/c/027jM6DLkIk

Bug: 1340825
Change-Id: I9f3b4b2cb20147fd48ba379b257c7280ba9c53f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4194897
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Junji Watanabe
2023-01-30 02:37:25 +00:00
committed by LUCI CQ
parent b7d8efd8be
commit 8f41177abf
4 changed files with 8 additions and 28 deletions

Binary file not shown.

BIN
ninja-mac

Binary file not shown.

BIN
ninja.exe

Binary file not shown.

View File

@@ -13,32 +13,6 @@ import sys
import gclient_paths
DEPOT_TOOLS_ROOT = os.path.abspath(os.path.dirname(__file__))
def fallbackToLegacyNinja(ninja_args):
print(
'depot_tools/ninja.py: Fallback to a deprecated legacy ninja binary. '
'Note that this ninja binary will be removed soon.\n'
'Please install ninja to your project using DEPS. '
'If your project does not have DEPS, Please install ninja in your PATH.\n'
'See also https://crbug.com/1340825',
file=sys.stderr)
exe_name = ''
if sys.platform == 'linux':
exe_name = 'ninja-linux64'
elif sys.platform == 'darwin':
exe_name = 'ninja-mac'
elif sys.platform in ['win32', 'cygwin']:
exe_name = 'ninja.exe'
else:
print('depot_tools/ninja.py: %s is not supported platform' % sys.platform)
return 1
ninja_path = os.path.join(DEPOT_TOOLS_ROOT, exe_name)
return subprocess.call([ninja_path] + ninja_args)
def findNinjaInPath():
env_path = os.getenv('PATH')
@@ -62,8 +36,14 @@ def fallback(ninja_args):
if ninja_path:
return subprocess.call([ninja_path] + ninja_args)
# TODO(crbug.com/1340825): remove raw binaries from depot_tools.
return fallbackToLegacyNinja(ninja_args)
print(
'depot_tools/ninja.py: Could not find Ninja in the third_party of '
'the current project, nor in your PATH.\n'
'Please take a following action to install Ninja.\n'
'- If your project has DEPS, Add a CIPD Ninja dependency to DEPS.\n'
'- Oterweise, Add Ninja to your PATH *after* depot_tools.',
file=sys.stderr)
return 1
def main(args):