@@ -367,7 +367,9 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration {
367367 : super ._subclass (configuration);
368368
369369 String computeCompilerPath () {
370- var prefix = 'sdk/bin' ;
370+ var prefix =
371+ // TODO(38701): Cleanup after merging the forked SDK into mainline.
372+ _configuration.nnbdMode == NnbdMode .legacy ? 'sdk/bin' : 'sdk_nnbd/bin' ;
371373 var suffix = shellScriptExtension;
372374
373375 if (_isHostChecked) {
@@ -459,7 +461,9 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
459461 CommandArtifact artifact) {
460462 var sdk = _useSdk
461463 ? Uri .directory (_configuration.buildDirectory).resolve ('dart-sdk/' )
462- : Uri .directory (Repository .dir.toNativePath ()).resolve ('sdk/' );
464+ : Uri .directory (Repository .dir.toNativePath ()).resolve (
465+ // TODO(38701): Cleanup after merging the forked SDK into mainline.
466+ _configuration.nnbdMode == NnbdMode .legacy ? 'sdk/' : 'sdk_nnbd/' );
463467 var preambleDir = sdk.resolve ('lib/_internal/js_runtime/lib/preambles/' );
464468 return runtimeConfiguration.dart2jsPreambles (preambleDir)
465469 ..add (artifact.filename);
@@ -492,6 +496,7 @@ class DevCompilerConfiguration extends CompilerConfiguration {
492496 String computeCompilerPath () {
493497 var dir = _useSdk
494498 ? "${_configuration .buildDirectory }/dart-sdk"
499+ // TODO(38701): Cleanup after merging the forked SDK into mainline.
495500 : _configuration.nnbdMode == NnbdMode .legacy ? "sdk" : "sdk_nnbd" ;
496501 return "$dir /bin/dartdevc$shellScriptExtension " ;
497502 }
@@ -916,7 +921,9 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
916921 int get timeoutMultiplier => 4 ;
917922
918923 String computeCompilerPath () {
919- var prefix = 'sdk/bin' ;
924+ var prefix =
925+ // TODO(38701): Cleanup after merging the forked SDK into mainline.
926+ _configuration.nnbdMode == NnbdMode .legacy ? 'sdk/bin' : 'sdk_nnbd/bin' ;
920927 if (_isHostChecked) {
921928 if (_useSdk) {
922929 throw "--host-checked and --use-sdk cannot be used together" ;
0 commit comments