| Index: pkg/analyzer/lib/src/context/builder.dart
|
| diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
|
| index bef683755c50a92f0f14603f15afc7f882a96a75..882094f350c37e6594bd3fba4aaeff45235ee842 100644
|
| --- a/pkg/analyzer/lib/src/context/builder.dart
|
| +++ b/pkg/analyzer/lib/src/context/builder.dart
|
| @@ -20,6 +20,7 @@ import 'package:analyzer/src/generated/sdk.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| import 'package:analyzer/src/summary/package_bundle_reader.dart';
|
| import 'package:analyzer/src/summary/pub_summary.dart';
|
| +import 'package:analyzer/src/summary/summary_sdk.dart';
|
| import 'package:analyzer/src/task/options.dart';
|
| import 'package:package_config/packages.dart';
|
| import 'package:package_config/packages_file.dart';
|
| @@ -96,6 +97,13 @@ class ContextBuilder {
|
| String defaultPackagesDirectoryPath;
|
|
|
| /**
|
| + * The file path of the file containing the summary of the SDK that should be
|
| + * used to "analyze" the SDK. This option should only be specified by
|
| + * command-line tools such as 'dartanalyzer' or 'ddc'.
|
| + */
|
| + String dartSdkSummaryPath;
|
| +
|
| + /**
|
| * The file path of the analysis options file that should be used in place of
|
| * any file in the root directory or a parent of the root directory, or `null`
|
| * if the normal lookup mechanism should be used.
|
| @@ -288,7 +296,9 @@ class ContextBuilder {
|
| */
|
| DartSdk findSdk(
|
| Map<String, List<Folder>> packageMap, AnalysisOptions options) {
|
| - if (packageMap != null) {
|
| + if (dartSdkSummaryPath != null) {
|
| + return new SummaryBasedDartSdk(dartSdkSummaryPath, options.strongMode);
|
| + } else if (packageMap != null) {
|
| SdkExtensionFinder extFinder = new SdkExtensionFinder(packageMap);
|
| List<String> extFilePaths = extFinder.extensionFilePaths;
|
| EmbedderYamlLocator locator = new EmbedderYamlLocator(packageMap);
|
|
|