parent
4f930b6e42
commit
034a792df1
14 changed files with 138 additions and 108 deletions
|
@ -7,5 +7,4 @@ workaround_an_undefined_symbol_error.patch
|
|||
do_not_export_private_v8_symbols_on_windows.patch
|
||||
revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch
|
||||
fix_build_deprecated_attirbute_for_older_msvc_versions.patch
|
||||
fix_use_proper_page_size_for_mac_arm64.patch
|
||||
chore_disallow_copying_cppheapcreateparams.patch
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@github.com>
|
||||
Date: Wed, 8 Jul 2020 10:46:13 -0400
|
||||
Subject: fix: use proper page size for mac arm64
|
||||
|
||||
This fix temporarily sets page size to 16k for mac arm64 so that mksnapshot can run on x64
|
||||
and generate a mac arm64 snapshot
|
||||
|
||||
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc
|
||||
index ab0d7839a453d87a8404ca791c1022871e8fd606..821a3925e91c229873f75ac024c1b388b4d0c06e 100644
|
||||
--- a/src/base/platform/platform-posix.cc
|
||||
+++ b/src/base/platform/platform-posix.cc
|
||||
@@ -165,9 +165,19 @@ void* Allocate(void* hint, size_t size, OS::MemoryPermission access,
|
||||
PageType page_type) {
|
||||
int prot = GetProtectionFromMemoryPermission(access);
|
||||
int flags = GetFlagsForMemoryPermission(access, page_type);
|
||||
+#if defined(__APPLE__) && V8_TARGET_ARCH_ARM64 && defined(__x86_64__)
|
||||
+ // XXX: This logic is simple and leaky as it is only used for mksnapshot.
|
||||
+ size_t alignment = 16384;
|
||||
+ void* result = mmap(hint, size + alignment, prot, flags, kMmapFd,
|
||||
+ kMmapFdOffset);
|
||||
+ if (result == MAP_FAILED) return nullptr;
|
||||
+ return reinterpret_cast<void*>(
|
||||
+ RoundUp(reinterpret_cast<uintptr_t>(result), alignment));
|
||||
+#else
|
||||
void* result = mmap(hint, size, prot, flags, kMmapFd, kMmapFdOffset);
|
||||
if (result == MAP_FAILED) return nullptr;
|
||||
return result;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#endif // !V8_OS_FUCHSIA
|
||||
@@ -224,7 +234,9 @@ void OS::Initialize(bool hard_abort, const char* const gc_fake_mmap) {
|
||||
}
|
||||
|
||||
int OS::ActivationFrameAlignment() {
|
||||
-#if V8_TARGET_ARCH_ARM
|
||||
+#if defined(__APPLE__) && V8_TARGET_ARCH_ARM
|
||||
+ return 4;
|
||||
+#elif V8_TARGET_ARCH_ARM
|
||||
// On EABI ARM targets this is required for fp correctness in the
|
||||
// runtime system.
|
||||
return 8;
|
Loading…
Add table
Add a link
Reference in a new issue