Skip to content

Commit 60630ed

Browse files
Jenny Messerlycommit-bot@chromium.org
Jenny Messerly
authored andcommitted
fix #30540, define dart.library.mirrors and isolate false in DDC
Change-Id: I0d26d32724096bfbebd53f4a0adcbbd9194cb8ec Reviewed-on: https://dart-review.googlesource.com/48885 Reviewed-by: Vijay Menon <[email protected]> Commit-Queue: Jenny Messerly <[email protected]>
1 parent 59d8596 commit 60630ed

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

pkg/dev_compiler/lib/src/analyzer/module_compiler.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ class ModuleCompiler {
113113
new InputPackagesResultProvider(context, summaryData);
114114
}
115115
options.declaredVariables.forEach(context.declaredVariables.define);
116-
context.declaredVariables.define('dart.isVM', 'false');
117-
118-
// TODO(vsm): Should this be hardcoded?
119-
context.declaredVariables.define('dart.library.html', 'true');
120-
context.declaredVariables.define('dart.library.io', 'false');
121-
context.declaredVariables.define('dart.library.ui', 'false');
116+
context.declaredVariables
117+
..define('dart.isVM', 'false')
118+
// TODO(vsm): Should this be hardcoded?
119+
..define('dart.library.html', 'true')
120+
..define('dart.library.io', 'false')
121+
..define('dart.library.ui', 'false')
122+
..define('dart.library.mirrors', 'false')
123+
..define('dart.library.isolate', 'false');
122124

123125
if (!context.analysisOptions.strongMode) {
124126
throw new ArgumentError('AnalysisContext must be strong mode');

pkg/dev_compiler/lib/src/kernel/command.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,15 @@ Map<String, String> parseAndRemoveDeclaredVariables(List<String> args) {
367367
}
368368

369369
// Add platform defined variables
370-
declaredVariables['dart.isVM'] = 'false';
371-
372-
// TODO(vsm): Should this be hardcoded?
373-
declaredVariables['dart.library.html'] = 'true';
374-
declaredVariables['dart.library.io'] = 'false';
375-
declaredVariables['dart.library.ui'] = 'false';
370+
declaredVariables.addAll({
371+
'dart.isVM': 'false',
372+
// TODO(vsm): Should this be hardcoded?
373+
'dart.library.html': 'true',
374+
'dart.library.io': 'false',
375+
'dart.library.ui': 'false',
376+
'dart.library.mirrors': 'false',
377+
'dart.library.isolate': 'false'
378+
});
376379

377380
return declaredVariables;
378381
}

0 commit comments

Comments
 (0)