Specify DEPS ninja path directly in build scripts instead of depot_tools/ninja wrapper

It's better to avoid calling DEPOT_TOOLS_PATH because ninja binaries in depot_tools will be removed soon.
Technically, it would work because depot_tools/ninja 'wrapper' can find the DEPS ninja path. But it's better to specify the ninja path directly instead of relying on the wrapper.

Bug: chromium:1340825
Change-Id: I992c12601e86be003acdb39ce6d29be817dc7522
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286520
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Cr-Commit-Position: refs/heads/main@{#38815}
This commit is contained in:
Junji Watanabe 2022-12-06 15:25:38 +09:00 committed by WebRTC LUCI CQ
parent e093c481bf
commit d8ed0c1f17
3 changed files with 3 additions and 3 deletions

View file

@ -121,7 +121,7 @@ def _RunGN(args):
def _RunNinja(output_directory, args):
cmd = [
os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'ninja'), '-C',
os.path.join(SRC_DIR, 'third_party', 'ninja', 'ninja'), '-C',
output_directory
]
cmd.extend(args)

View file

@ -197,7 +197,7 @@ def BuildWebRTC(output_dir, target_environment, target_arch, flavor,
logging.info('Building target: %s', gn_target_name)
cmd = [
os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'ninja'),
os.path.join(SRC_DIR, 'third_party', 'ninja', 'ninja'),
'-C',
output_dir,
gn_target_name,

View file

@ -69,7 +69,7 @@ def RunGnCheck(root_dir=None):
def RunNinjaCommand(args, root_dir=None):
"""Runs ninja quietly. Any failure (e.g. clang not found) is
silently discarded, since this is unlikely an error in submitted CL."""
command = [os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'ninja')] + args
command = [os.path.join(SRC_DIR, 'third_party', 'ninja', 'ninja')] + args
p = subprocess.Popen(command,
cwd=root_dir,
stdout=subprocess.PIPE,