Skip to content

Commit

Permalink
[dartdev] Fix ia32 invocation of dart2js from 'compile js' command.
Browse files Browse the repository at this point in the history
TEST=ci

Change-Id: I5b7a180cdadeb9a78038af8dc0631fad7b757a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405260
Commit-Queue: Siva Annamalai <[email protected]>
Reviewed-by: Ben Konyi <[email protected]>
  • Loading branch information
a-siva authored and Commit Queue committed Jan 21, 2025
1 parent 9b7bb9d commit 1a48649
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/dartdev/lib/src/commands/compile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,19 @@ class CompileJSCommand extends CompileSubcommandCommand {
}
final args = argResults!;
var snapshot = sdk.dart2jsAotSnapshot;
var runtime = sdk.dartAotRuntime;
var script = sdk.dartAotRuntime;
var useExecProcess = true;
if (!Sdk.checkArtifactExists(snapshot, logError: false)) {
// AOT snapshots cannot be generated on IA32, so we need this fallback
// branch until support for IA32 is dropped (https://dartbug.com/49969).
snapshot = sdk.dart2jsSnapshot;
if (!Sdk.checkArtifactExists(snapshot)) {
script = sdk.dart2jsSnapshot;
if (!Sdk.checkArtifactExists(script)) {
return genericErrorExitCode;
}
runtime = sdk.dart;
useExecProcess = false;
}
final dart2jsCommand = [
snapshot,
if (useExecProcess) snapshot,
'--libraries-spec=${sdk.librariesJson}',
'--cfe-invocation-modes=compile',
'--invoker=dart_cli',
Expand All @@ -115,7 +114,7 @@ class CompileJSCommand extends CompileSubcommandCommand {
];
try {
VmInteropHandler.run(
runtime,
script,
dart2jsCommand,
packageConfigOverride: null,
useExecProcess: useExecProcess,
Expand Down

0 comments on commit 1a48649

Please sign in to comment.