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

Unified Diff: sdk/lib/_internal/pub/lib/src/dart.dart

Issue 136003018: Properly pass environment variables from pub to dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code reivew Created 6 years, 11 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 | sdk/lib/_internal/pub/test/transformer/dart2js/passes_along_environment_constants_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/dart.dart
diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
index 89845af29d46a1dbc12343a0795196d328d3140d..e160572d3ad35a10d9ee3b67405e3fad93c4d42d 100644
--- a/sdk/lib/_internal/pub/lib/src/dart.dart
+++ b/sdk/lib/_internal/pub/lib/src/dart.dart
@@ -72,12 +72,7 @@ Future compile(String entrypoint, CompilerProvider provider, {
if (terse) options.add('--terse');
if (toDart) options.add('--output-type=dart');
- if (environment != null) {
- environment.forEach((name, value) {
- options.add('-D$name=$value');
- });
- }
-
+ if (environment == null) environment = {};
if (commandLineOptions != null) options.addAll(commandLineOptions);
if (packageRoot == null) {
@@ -91,7 +86,8 @@ Future compile(String entrypoint, CompilerProvider provider, {
provider.provideInput,
provider.handleDiagnostic,
options,
- provider.provideOutput));
+ provider.provideOutput,
+ environment));
});
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/transformer/dart2js/passes_along_environment_constants_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698