Skip to content

Commit 24b3c38

Browse files
add debug trace when compiling dart2js (#116238)
1 parent c461f4f commit 24b3c38

File tree

1 file changed

+7
-4
lines changed
  • packages/flutter_tools/lib/src/build_system/targets

1 file changed

+7
-4
lines changed

packages/flutter_tools/lib/src/build_system/targets/web.dart

+7-4
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,19 @@ class Dart2JSTarget extends Target {
208208
'--no-source-maps',
209209
];
210210

211-
// Run the dart2js compilation in two stages, so that icon tree shaking can
212-
// parse the kernel file for web builds.
213-
final ProcessResult kernelResult = await globals.processManager.run(<String>[
211+
final List<String> compilationArgs = <String>[
214212
...sharedCommandOptions,
215213
'-o',
216214
environment.buildDir.childFile('app.dill').path,
217215
'--packages=.dart_tool/package_config.json',
218216
'--cfe-only',
219217
environment.buildDir.childFile('main.dart').path, // dartfile
220-
]);
218+
];
219+
globals.printTrace('compiling dart code to kernel with command "${compilationArgs.join(' ')}"');
220+
221+
// Run the dart2js compilation in two stages, so that icon tree shaking can
222+
// parse the kernel file for web builds.
223+
final ProcessResult kernelResult = await globals.processManager.run(compilationArgs);
221224
if (kernelResult.exitCode != 0) {
222225
throw Exception(_collectOutput(kernelResult));
223226
}

0 commit comments

Comments
 (0)