Index: dart/frog/leg/frog_leg.dart |
diff --git a/dart/frog/leg/frog_leg.dart b/dart/frog/leg/frog_leg.dart |
index 100f2eb33f8d855978937ff58a07d3e46431acd9..6824041a59daa57867b1775ae95243d95e18a1ee 100644 |
--- a/dart/frog/leg/frog_leg.dart |
+++ b/dart/frog/leg/frog_leg.dart |
@@ -42,6 +42,7 @@ String relativize(Uri base, Uri uri) { |
bool compile(frog.World world) { |
final throwOnError = frog.options.throwOnErrors; |
final showWarnings = frog.options.showWarnings; |
+ final allowMockCompilation = frog.options.allowMockCompilation; |
// final compiler = new WorldCompiler(world, throwOnError); |
Uri cwd = new Uri(scheme: 'file', path: io.getCurrentDirectory()); |
Uri uri = cwd.resolve(frog.options.dartScript); |
@@ -79,9 +80,12 @@ bool compile(frog.World world) { |
if (fatal && throwOnError) throw new AbortLeg(message); |
} |
+ List<String> options = new List<String>(); |
+ if (allowMockCompilation) options.add('--allow-mock-compilation'); |
+ |
// TODO(ahe): We expect the future to be complete and call value |
// directly. In effect, we don't support truly asynchronous API. |
- String code = api.compile(uri, libraryRoot, provider, handler).value; |
+ String code = api.compile(uri, libraryRoot, provider, handler, options).value; |
if (code === null) return false; |
world.legCode = code; |
world.jsBytesWritten = code.length; |