mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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:
BIN
ninja-linux64
BIN
ninja-linux64
Binary file not shown.
36
ninja.py
36
ninja.py
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user