Index: pkg/compiler/lib/src/library_loader.dart |
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart |
index f0b296b1581b9663c8886a416fb63127667a9264..6006bc93b4d19971920fd2adcc0ac0f19f98ca01 100644 |
--- a/pkg/compiler/lib/src/library_loader.dart |
+++ b/pkg/compiler/lib/src/library_loader.dart |
@@ -384,7 +384,21 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask { |
return reporter.withCurrentElement(library, () { |
Uri computeUri(LibraryDependency node) { |
- String tagUriString = node.uri.dartString.slowToString(); |
+ StringNode uriNode = node.uri; |
+ if (node.conditionalUris != null) { |
+ for (ConditionalUri conditionalUri in node.conditionalUris) { |
+ String key = conditionalUri.key.slowNameString; |
+ String value = conditionalUri.value == null |
+ ? "true" |
+ : conditionalUri.value.dartString.slowToString(); |
+ String actual = compiler.fromEnvironment(key); |
+ if (value == actual) { |
+ uriNode = conditionalUri.uri; |
+ break; |
+ } |
+ } |
+ } |
+ String tagUriString = uriNode.dartString.slowToString(); |
try { |
return Uri.parse(tagUriString); |
} on FormatException { |