Revert "[vm] Require exact operating system match for snapshots with code."

This reverts commit 5b144f2ecb.

Reason for revert: b/240912656

Original change's description:
> [vm] Require exact operating system match for snapshots with code.
>
> TEST=ci
> Change-Id: Ifb9e673f4aef0d42c2ef058174051ed6ed20b17b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252844
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Brian Quinlan <bquinlan@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Id03a1d741d6dde6a570a91721771da842f2496a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253282
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ivan Inozemtsev 2022-08-01 16:32:44 +00:00 committed by Commit Bot
parent e364fda064
commit 4324491619

View file

@ -1133,17 +1133,30 @@ char* Dart::FeaturesString(IsolateGroup* isolate_group,
FLAG_branch_coverage);
}
// Generated code must match the host architecture and ABI. We check the
// strong condition of matching on operating system so that
// Platform.isAndroid etc can be compile-time constants.
#if defined(TARGET_ARCH_IA32)
// Generated code must match the host architecture and ABI.
#if defined(TARGET_ARCH_ARM)
#if defined(DART_TARGET_OS_MACOS) || defined(DART_TARGET_OS_MACOS_IOS)
buffer.AddString(" arm-ios");
#else
buffer.AddString(" arm-eabi");
#endif
buffer.AddString(TargetCPUFeatures::hardfp_supported() ? " hardfp"
: " softfp");
#elif defined(TARGET_ARCH_ARM64)
#if defined(DART_TARGET_OS_FUCHSIA)
// See signal handler cheat in Assembler::EnterFrame.
buffer.AddString(" arm64-fuchsia");
#else
buffer.AddString(" arm64-sysv");
#endif
#elif defined(TARGET_ARCH_IA32)
buffer.AddString(" ia32");
#elif defined(TARGET_ARCH_X64)
buffer.AddString(" x64");
#elif defined(TARGET_ARCH_ARM)
buffer.AddString(" arm");
#elif defined(TARGET_ARCH_ARM64)
buffer.AddString(" arm64");
#if defined(DART_TARGET_OS_WINDOWS)
buffer.AddString(" x64-win");
#else
buffer.AddString(" x64-sysv");
#endif
#elif defined(TARGET_ARCH_RISCV32)
buffer.AddString(" riscv32");
#elif defined(TARGET_ARCH_RISCV64)
@ -1151,25 +1164,6 @@ char* Dart::FeaturesString(IsolateGroup* isolate_group,
#else
#error What architecture?
#endif
#if defined(DART_TARGET_OS_ANDROID)
buffer.AddString(" android");
#elif defined(DART_TARGET_OS_FUCHSIA)
buffer.AddString(" fuchsia");
#elif defined(DART_TARGET_OS_MACOS)
#if defined(DART_TARGET_OS_MACOS_IOS)
buffer.AddString(" ios");
#else
buffer.AddString(" macos");
#endif
#elif defined(DART_TARGET_OS_LINUX)
buffer.AddString(" linux");
#elif defined(DART_TARGET_OS_WINDOWS)
buffer.AddString(" windows");
#else
#error What operating system?
#endif
#if defined(DART_COMPRESSED_POINTERS)
buffer.AddString(" compressed-pointers");
#else