Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: pkg/front_end/lib/src/fasta/testing/kernel_chain.dart

Issue 2981813002: Move `reify` to use fasta instead of dartk (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/kernel/test/closures/suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
index bdb0ff71bacb40946129d9ee6bad1e44288a72db..3aae872d3e6b5bf6cce477a96a4d2796290c21dd 100644
--- a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
+++ b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
@@ -15,6 +15,8 @@ import 'dart:typed_data' show Uint8List;
import 'package:kernel/kernel.dart' show loadProgramFromBinary;
+import 'package:kernel/target/targets.dart' show Target;
+
import 'package:kernel/text/ast_to_text.dart' show Printer;
import 'package:testing/testing.dart' show Result, StdioProcess, Step;
@@ -192,20 +194,28 @@ class Compile extends Step<TestDescription, Program, CompileContext> {
}
Uri sdk = await computePatchedSdk();
- Program p = await kernelForProgram(
- description.uri,
- new CompilerOptions()
- ..sdkRoot = sdk
- ..packagesFileUri = Uri.base.resolve('.packages')
- ..strongMode = context.strongMode
- ..linkedDependencies = [sdk.resolve('platform.dill')]
- ..onError = reportError);
+ var options = new CompilerOptions()
+ ..sdkRoot = sdk
+ ..compileSdk = true
+ ..packagesFileUri = Uri.base.resolve('.packages')
+ ..strongMode = context.strongMode
+ ..onError = reportError;
+ if (context.target != null) {
+ options.target = context.target;
+ // Do not link platform.dill, but recompile the platform libraries. This
Siggi Cherem (dart-lang) 2017/07/13 22:22:29 BTW - I want to change that about how we include s
+ // ensures that if target defines extra libraries that those get included
+ // too.
+ } else {
+ options.linkedDependencies = [sdk.resolve('platform.dill')];
+ }
+ Program p = await kernelForProgram(description.uri, options);
return result ??= pass(p);
}
}
abstract class CompileContext implements ChainContext {
bool get strongMode;
+ Target get target;
}
class BytesCollector implements Sink<List<int>> {
« no previous file with comments | « no previous file | pkg/kernel/test/closures/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698