9a2234461a
Attempting to use the native definition when available causes problems when cross-compiling, and the original attempts to avoid this broke in subtle ways. Instead, just make a non-native definition that mimics the native definition and use that with reinterpret_casts when sending uses of the non-native definition to Windows API calls that expect a value of the native definition. TEST=windows ci Fixes: https://github.com/dart-lang/sdk/issues/60771 Change-Id: I347fcaf8cccd809a3d8e6f041cc7e360b0b8226e Cq-Include-Trybots: luci.dart.try:vm-aot-win-release-arm64-try,vm-aot-win-release-x64-try,vm-win-release-arm64-try,vm-win-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,pkg-win-release-try,pkg-win-release-arm64-try,dart-sdk-win-try,dart-sdk-win-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430400 Reviewed-by: Slava Egorov <vegorov@google.com>
29 lines
968 B
C++
29 lines
968 B
C++
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/unwinding_records.h"
|
|
|
|
namespace dart {
|
|
|
|
// The default definition when not precompiling for a Windows target.
|
|
#if !defined(UNWINDING_RECORDS_WINDOWS_PRECOMPILER)
|
|
|
|
const void* UnwindingRecords::GenerateRecordsInto(intptr_t offset,
|
|
uint8_t* target_buffer) {
|
|
return nullptr;
|
|
}
|
|
|
|
#endif // !defined(UNWINDING_RECORDS_WINDOWS_PRECOMPILER)
|
|
|
|
// The default definition when the ElfLoader is not used or the VM is not
|
|
// running on a Windows system.
|
|
#if !defined(UNWINDING_RECORDS_WINDOWS_HOST)
|
|
|
|
void UnwindingRecords::RegisterExecutablePage(Page* page) {}
|
|
void UnwindingRecords::UnregisterExecutablePage(Page* page) {}
|
|
|
|
#endif // !defined(UNWINDING_RECORDS_WINDOWS_HOST)
|
|
|
|
} // namespace dart
|