Skip to content

Commit

Permalink
Specify sdkSummary when compiling via frontend server (flutter#4733)
Browse files Browse the repository at this point in the history
Without specifying sdkSummary it defaults to vm_outline.dill which is not what we want if using mixins from the sdk.
  • Loading branch information
jensjoha authored and mraleph committed Mar 1, 2018
1 parent 6607231 commit 5e2738f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend_server/lib/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
];
Expand Down

0 comments on commit 5e2738f

Please sign in to comment.