From 61c226b4eaaf89d879c8338aa71770bd801ecd86 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Wed, 2 May 2018 16:27:15 +0000 Subject: [PATCH] Only create Goma's analyzer on Linux. Bug: https://github.com/dart-lang/sdk/issues/33011 Change-Id: I9bc294fb4cda2b2c8b2d552feb18c7ce6af28695 Reviewed-on: https://dart-review.googlesource.com/53341 Reviewed-by: Zach Anderson Commit-Queue: Ryan Macnak --- runtime/vm/dart_api_impl.cc | 4 ++++ utils/dartanalyzer/BUILD.gn | 28 +++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index 625815aad93..97792013a5c 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -6571,6 +6571,8 @@ Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, return Api::NewError("AOT compilation is not supported on IA32."); #elif defined(TARGET_ARCH_DBC) return Api::NewError("AOT compilation is not supported on DBC."); +#elif defined(TARGET_OS_WINDOWS) + return Api::NewError("Assembly generation is not implemented for Windows."); #elif !defined(DART_PRECOMPILER) return Api::NewError( "This VM was built without support for AOT compilation."); @@ -6609,6 +6611,8 @@ Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, return Api::NewError("AOT compilation is not supported on IA32."); #elif defined(TARGET_ARCH_DBC) return Api::NewError("AOT compilation is not supported on DBC."); +#elif defined(TARGET_OS_WINDOWS) + return Api::NewError("Assembly generation is not implemented for Windows."); #elif !defined(DART_PRECOMPILER) return Api::NewError( "This VM was built without support for AOT compilation."); diff --git a/utils/dartanalyzer/BUILD.gn b/utils/dartanalyzer/BUILD.gn index 961951224da..3a9f0ee710b 100644 --- a/utils/dartanalyzer/BUILD.gn +++ b/utils/dartanalyzer/BUILD.gn @@ -29,20 +29,22 @@ application_snapshot("generate_dartanalyzer_snapshot") { name = "dartanalyzer" } -aot_assembly("dartanalyzer_aot_assembly") { - main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" - name = "dartanalyzer" -} +if (current_os == "linux") { + aot_assembly("dartanalyzer_aot_assembly") { + main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" + name = "dartanalyzer" + } -# This target is for Goma. It should not be used in the SDK. -executable("dartanalyzer_aot") { - deps = [ - "../../runtime/bin:dart_precompiled_runtime_for_linking", - ":dartanalyzer_aot_assembly", - ] - sources = [ - "$root_gen_dir/dartanalyzer.dart.S" - ] + # This target is for Goma. It should not be used in the SDK. + executable("dartanalyzer_aot") { + deps = [ + "../../runtime/bin:dart_precompiled_runtime_for_linking", + ":dartanalyzer_aot_assembly", + ] + sources = [ + "$root_gen_dir/dartanalyzer.dart.S" + ] + } } sdk_lib_files = exec_script("../../tools/list_dart_files.py",