| Index: lib/custom_backend.dart
|
| diff --git a/lib/custom_backend.dart b/lib/custom_backend.dart
|
| index 5a388f2a9ab04d33a7a2befbfb9239024962be4c..7a0e5667283f0ec5f99fcf79e7ba132bfbeb1c51 100644
|
| --- a/lib/custom_backend.dart
|
| +++ b/lib/custom_backend.dart
|
| @@ -126,4 +126,15 @@ class CustomBackend extends Backend {
|
| @override MethodElement resolveExternalFunction(MethodElement element) {
|
| return patchResolver.resolveExternalFunction(element);
|
| }
|
| +
|
| + @override bool canLibraryUseNative(LibraryElement library) {
|
| + return library.isPlatformLibrary || isNativeTest(library);
|
| + }
|
| +
|
| + /// Returns true if [library] is a test of native keyword.
|
| + bool isNativeTest(LibraryElement library) {
|
| + Uri uri = library.canonicalUri;
|
| + return uri.scheme == "file" &&
|
| + uri.path.contains("/test/kernel/regression/native/");
|
| + }
|
| }
|
|
|