Reland "Add a buildtools directory and move third_party/ninja to the project root in order to match the expectations of depot_tools" (#164240)

Relands https://github.com/flutter/flutter/pull/163890 and updates the
Ninja path used by the engine tool
This commit is contained in:
Jason Simmons
2025-02-27 00:13:58 +00:00
committed by GitHub
parent 0f3b092a10
commit 1d25f6953d
8 changed files with 15 additions and 5 deletions

View File

@@ -2295,7 +2295,6 @@
../../../flutter/third_party/libwebp/swig
../../../flutter/third_party/libwebp/tests
../../../flutter/third_party/libwebp/webp_js
../../../flutter/third_party/ninja
../../../flutter/third_party/ocmock
../../../flutter/third_party/perfetto/.clang-format
../../../flutter/third_party/perfetto/.clang-tidy

View File

@@ -1,17 +0,0 @@
Name: ninja
Short Name: ninja
URL: https://github.com/ninja-build/ninja
Revision: See the CIPD version in DEPS
License: Apache License 2.0
License File: https://github.com/ninja-build/ninja/blob/master/COPYING
Security Critical: no
Description:
Ninja is a small build system with a focus on speed, and is used to build
this project.
The CIPD packages are built using the 3pp pipeline.
https://chromium.googlesource.com/infra/infra/+/refs/heads/main/3pp/ninja/
Local Modifications:
None

View File

@@ -583,8 +583,7 @@ final class BuildRunner extends Runner {
bool success = false;
try {
final String ninjaPath = p.join(
engineSrcDir.path,
'flutter',
engineSrcDir.parent.parent.path,
'third_party',
'ninja',
'ninja',

View File

@@ -116,7 +116,8 @@ void main() {
// Check that the events for the Ninja command are correct.
expect(events[2] is RunnerStart, isTrue);
expect(events[2].name, equals('$buildName: ninja'));
expect(events[2].command[0], contains('ninja'));
final String rootPath = path.dirname(path.dirname(engine.srcDir.path));
expect(events[2].command[0], equals('$rootPath/third_party/ninja/ninja'));
final String configPath = '${engine.srcDir.path}/out/${targetBuild.ninja.config}';
expect(events[2].command.contains(configPath), isTrue);
for (final String target in targetBuild.ninja.targets) {