Specify sdkSummary when compiling via frontend server (flutter/engine#4733)

Without specifying sdkSummary it defaults to vm_outline.dill which is not what we want if using mixins from the sdk.
This commit is contained in:
jensjoha
2018-03-01 11:32:08 +01:00
committed by Vyacheslav Egorov
parent 446118c542
commit ae33eb844f

View File

@@ -182,10 +182,13 @@ class _FrontendCompiler implements CompilerInterface {
final String boundaryKey = new Uuid().generateV4();
_outputStream.writeln('result $boundaryKey');
final Uri sdkRoot = _ensureFolderPath(options['sdk-root']);
final String platformKernelDill =
options['strong'] ? 'platform_strong.dill' : 'platform.dill';
final CompilerOptions compilerOptions = new CompilerOptions()
..sdkRoot = sdkRoot
..packagesFileUri = options['packages'] != null ? Uri.base.resolveUri(new Uri.file(options['packages'])) : null
..strongMode = options['strong']
..sdkSummary = sdkRoot.resolve(platformKernelDill)
..target = new FlutterTarget(new TargetFlags(strongMode: options['strong']))
..reportMessages = true;
@@ -199,8 +202,6 @@ class _FrontendCompiler implements CompilerInterface {
if (options['link-platform']) {
// TODO(aam): Remove linkedDependencies once platform is directly embedded
// into VM snapshot and http://dartbug.com/30111 is fixed.
final String platformKernelDill =
options['strong'] ? 'platform_strong.dill' : 'platform.dill';
compilerOptions.linkedDependencies = <Uri>[
sdkRoot.resolve(platformKernelDill)
];