mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove unused snapshot.d depfile parameter (#20584)
This commit is contained in:
parent
2c0329a103
commit
b5b55447a4
@ -410,8 +410,7 @@ abstract class BaseFlutterTask extends DefaultTask {
|
|||||||
|
|
||||||
@OutputFiles
|
@OutputFiles
|
||||||
FileCollection getDependenciesFiles() {
|
FileCollection getDependenciesFiles() {
|
||||||
// For AOT and Core JIT builds, include the gen_snapshot depfile.
|
FileCollection depfiles = project.files()
|
||||||
FileCollection depfiles = project.files("${intermediateDir}/snapshot.d")
|
|
||||||
if (previewDart2) {
|
if (previewDart2) {
|
||||||
// For Dart 2, also include the kernel compiler depfile, since
|
// For Dart 2, also include the kernel compiler depfile, since
|
||||||
// kernel compile is the first stage of AOT build in this mode,
|
// kernel compile is the first stage of AOT build in this mode,
|
||||||
|
@ -44,7 +44,6 @@ class GenSnapshot {
|
|||||||
Future<int> run({
|
Future<int> run({
|
||||||
@required SnapshotType snapshotType,
|
@required SnapshotType snapshotType,
|
||||||
@required String packagesPath,
|
@required String packagesPath,
|
||||||
@required String depfilePath,
|
|
||||||
IOSArch iosArch,
|
IOSArch iosArch,
|
||||||
Iterable<String> additionalArgs = const <String>[],
|
Iterable<String> additionalArgs = const <String>[],
|
||||||
}) {
|
}) {
|
||||||
@ -121,7 +120,6 @@ class ScriptSnapshotter {
|
|||||||
final int exitCode = await genSnapshot.run(
|
final int exitCode = await genSnapshot.run(
|
||||||
snapshotType: snapshotType,
|
snapshotType: snapshotType,
|
||||||
packagesPath: packagesPath,
|
packagesPath: packagesPath,
|
||||||
depfilePath: depfilePath,
|
|
||||||
additionalArgs: args,
|
additionalArgs: args,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -260,7 +258,7 @@ class AOTSnapshotter {
|
|||||||
'sharedLib': buildSharedLibrary.toString(),
|
'sharedLib': buildSharedLibrary.toString(),
|
||||||
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
|
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
|
||||||
},
|
},
|
||||||
depfilePaths: <String>[depfilePath],
|
depfilePaths: <String>[],
|
||||||
);
|
);
|
||||||
if (await fingerprinter.doesFingerprintMatch()) {
|
if (await fingerprinter.doesFingerprintMatch()) {
|
||||||
printTrace('Skipping AOT snapshot build. Fingerprint match.');
|
printTrace('Skipping AOT snapshot build. Fingerprint match.');
|
||||||
@ -271,7 +269,6 @@ class AOTSnapshotter {
|
|||||||
final int genSnapshotExitCode = await genSnapshot.run(
|
final int genSnapshotExitCode = await genSnapshot.run(
|
||||||
snapshotType: snapshotType,
|
snapshotType: snapshotType,
|
||||||
packagesPath: packageMap.packagesPath,
|
packagesPath: packageMap.packagesPath,
|
||||||
depfilePath: depfilePath,
|
|
||||||
additionalArgs: genSnapshotArgs,
|
additionalArgs: genSnapshotArgs,
|
||||||
iosArch: iosArch,
|
iosArch: iosArch,
|
||||||
);
|
);
|
||||||
@ -283,7 +280,7 @@ class AOTSnapshotter {
|
|||||||
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
|
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
|
||||||
// the Dart SDK.
|
// the Dart SDK.
|
||||||
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
|
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
|
||||||
await outputDir.childFile('gen_snapshot.d').writeAsString('snapshot.d: $genSnapshotPath\n');
|
await outputDir.childFile('gen_snapshot.d').writeAsString('gen_snapshot.d: $genSnapshotPath\n');
|
||||||
|
|
||||||
// On iOS, we use Xcode to compile the snapshot into a dynamic library that the
|
// On iOS, we use Xcode to compile the snapshot into a dynamic library that the
|
||||||
// end-developer can link into their app.
|
// end-developer can link into their app.
|
||||||
@ -498,7 +495,7 @@ class CoreJITSnapshotter {
|
|||||||
'entryPoint': mainPath,
|
'entryPoint': mainPath,
|
||||||
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
|
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
|
||||||
},
|
},
|
||||||
depfilePaths: <String>[depfilePath],
|
depfilePaths: <String>[],
|
||||||
);
|
);
|
||||||
if (await fingerprinter.doesFingerprintMatch()) {
|
if (await fingerprinter.doesFingerprintMatch()) {
|
||||||
printTrace('Skipping Core JIT snapshot build. Fingerprint match.');
|
printTrace('Skipping Core JIT snapshot build. Fingerprint match.');
|
||||||
@ -509,7 +506,6 @@ class CoreJITSnapshotter {
|
|||||||
final int genSnapshotExitCode = await genSnapshot.run(
|
final int genSnapshotExitCode = await genSnapshot.run(
|
||||||
snapshotType: snapshotType,
|
snapshotType: snapshotType,
|
||||||
packagesPath: packagesPath,
|
packagesPath: packagesPath,
|
||||||
depfilePath: depfilePath,
|
|
||||||
additionalArgs: genSnapshotArgs,
|
additionalArgs: genSnapshotArgs,
|
||||||
);
|
);
|
||||||
if (genSnapshotExitCode != 0) {
|
if (genSnapshotExitCode != 0) {
|
||||||
@ -520,7 +516,7 @@ class CoreJITSnapshotter {
|
|||||||
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
|
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
|
||||||
// the Dart SDK.
|
// the Dart SDK.
|
||||||
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
|
final String genSnapshotPath = GenSnapshot.getSnapshotterPath(snapshotType);
|
||||||
await outputDir.childFile('gen_snapshot.d').writeAsString('snapshot.d: $genSnapshotPath\n');
|
await outputDir.childFile('gen_snapshot.d').writeAsString('gen_snapshot.d: $genSnapshotPath\n');
|
||||||
|
|
||||||
// Compute and record build fingerprint.
|
// Compute and record build fingerprint.
|
||||||
await fingerprinter.writeFingerprint();
|
await fingerprinter.writeFingerprint();
|
||||||
|
@ -164,7 +164,6 @@ void main() {
|
|||||||
expect(genSnapshot.snapshotType.platform, isNull);
|
expect(genSnapshot.snapshotType.platform, isNull);
|
||||||
expect(genSnapshot.snapshotType.mode, BuildMode.debug);
|
expect(genSnapshot.snapshotType.mode, BuildMode.debug);
|
||||||
expect(genSnapshot.packagesPath, '.packages');
|
expect(genSnapshot.packagesPath, '.packages');
|
||||||
expect(genSnapshot.depfilePath, 'output.snapshot.d');
|
|
||||||
expect(genSnapshot.additionalArgs, <String>[
|
expect(genSnapshot.additionalArgs, <String>[
|
||||||
'--snapshot_kind=script',
|
'--snapshot_kind=script',
|
||||||
'--script_snapshot=output.snapshot',
|
'--script_snapshot=output.snapshot',
|
||||||
|
Loading…
Reference in New Issue
Block a user