Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f915de7
deps: update V8 to 13.6.233.6
targos Apr 15, 2025
9a14476
build: reset embedder string to "-node.0"
targos Apr 15, 2025
03ecee1
src: update NODE_MODULE_VERSION to 137
targos Apr 15, 2025
f8484a3
deps: always define V8_EXPORT_PRIVATE as no-op
targos Sep 21, 2022
df034a3
deps: disable V8 concurrent sparkplug compilation
targos Apr 6, 2023
16f4e38
deps: patch V8 to avoid duplicated zlib symbol
targos Sep 16, 2023
ce7f768
deps: patch V8 to support compilation with MSVC
StefanStojanovic Apr 21, 2024
d84aa98
deps: fix FP16 bitcasts.h
StefanStojanovic May 28, 2024
e9e3fc2
deps: always define V8_NODISCARD as no-op
targos Aug 8, 2024
ae7e3cf
deps: define V8_PRESERVE_MOST as no-op on Windows
StefanStojanovic Dec 16, 2024
fe49d0d
deps: remove problematic comment from v8-internal
targos Mar 19, 2025
02f8cdb
deps: patch V8 to fix armv7 build
targos Feb 25, 2025
72cbe56
deps: patch V8 13.4 to support compilation with MSVC
StefanStojanovic Apr 1, 2025
0c920ee
build: remove support for s390 32-bit
richardlau Sep 18, 2024
d0666f7
build: enable shared RO heap with ptr compression
targos Sep 21, 2024
781a91a
tools: update V8 gypfiles for 13.1
targos Sep 25, 2024
b8e96ff
tools: update V8 gypfiles for 13.2
targos Oct 28, 2024
4f63b97
build,src,tools: adapt build config for V8 13.3
targos Dec 19, 2024
466f8d3
tools: update V8 gypfiles for 13.4
targos Jan 20, 2025
3916875
build: add `/bigobj` to compile V8 on Windows
targos Feb 5, 2025
f5abab5
src: replace uses of FastApiTypedArray
targos Feb 8, 2025
93adc34
Revert "test: disable fast API call count checks"
targos Jan 31, 2025
2d1b956
test: update test-linux-perf-logger
targos Feb 4, 2025
4c968ba
test: adapt assert tests to stack trace changes
targos Dec 20, 2024
186ae67
test: handle explicit resource management globals
targos Dec 21, 2024
e7190d2
deps: remove deps/simdutf
targos Jan 29, 2025
c85814a
tools: update license-builder and LICENSE for V8 deps
targos Jan 29, 2025
82589aa
src: use `v8::ExternalMemoryAccounter`
targos Feb 15, 2025
a7ba032
src,test: add V8 API to test the hash seed
targos Feb 20, 2025
d719f4a
build: pass `-fPIC` to linker as well for shared builds
targos Apr 2, 2025
0233fbf
build: fix V8 TLS config for shared lib builds
targos Apr 3, 2025
0d57bdb
tools: update V8 gypfiles for 13.5
targos Feb 25, 2025
a7b65ea
tools: update V8 gypfiles for 13.6
targos Apr 5, 2025
7ff9b4e
build: update list of installed cppgc headers
targos Apr 6, 2025
0d2c26c
test: fix test-fs-write for V8 13.6
targos Apr 9, 2025
01e84eb
src: use V8-owned CppHeap
joyeecheung May 29, 2024
e2899ea
src: use non-deprecated Utf8LengthV2() method
anonrig Apr 17, 2025
7e28dac
src: use non-deprecated WriteUtf8V2() method
anonrig Apr 17, 2025
698020f
deps: V8: backport 954187bb1b87
joyeecheung Apr 24, 2025
afae6c6
src, test: unregister the isolate after disposal and before freeing
joyeecheung Apr 21, 2025
c34c6c3
illumos pointers are VA48, can allocate from the top of the 64-bit ra…
danmcd Apr 18, 2025
092ebfa
try v8 patch
targos Apr 17, 2025
34dc8fa
deps: disable separate_gc_phases
joyeecheung Apr 24, 2025
90684fb
deps: use std::map in MSVC STL for EphemeronRememberedSet
joyeecheung Apr 28, 2025
2859c3f
fixup! src: replace uses of FastApiTypedArray
joyeecheung Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build,src,tools: adapt build config for V8 13.3
  • Loading branch information
targos authored and joyeecheung committed Apr 28, 2025
commit 4f63b974358f7619ce7975c1b6be7fc8af5be98e
7 changes: 0 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,6 @@
default=None,
help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)')

parser.add_argument('--disable-shared-readonly-heap',
action='store_true',
dest='disable_shared_ro_heap',
default=None,
help='Disable the shared read-only heap feature in V8')

parser.add_argument('--v8-options',
action='store',
dest='v8_options',
Expand Down Expand Up @@ -1720,7 +1714,6 @@ def configure_v8(o, configs):
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.disable_shared_ro_heap else 1
o['variables']['v8_enable_extensible_ro_snapshot'] = 0
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
Expand Down
3 changes: 0 additions & 3 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@
'NODE_USE_V8_PLATFORM=0',
],
}],
[ 'v8_enable_shared_ro_heap==1', {
'defines': ['NODE_V8_SHARED_RO_HEAP',],
}],
[ 'node_tag!=""', {
'defines': [ 'NODE_TAG="<(node_tag)"' ],
}],
Expand Down
4 changes: 0 additions & 4 deletions src/api/embed_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,7 @@ EmbedderSnapshotData::EmbedderSnapshotData(const SnapshotData* impl,
: impl_(impl), owns_impl_(owns_impl) {}

bool EmbedderSnapshotData::CanUseCustomSnapshotPerIsolate() {
#ifdef NODE_V8_SHARED_RO_HEAP
return false;
#else
return true;
#endif
}

} // namespace node
6 changes: 2 additions & 4 deletions src/api/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,15 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
SnapshotBuilder::InitializeIsolateParams(snapshot_data, params);
}

#ifdef NODE_V8_SHARED_RO_HEAP
{
// In shared-readonly-heap mode, V8 requires all snapshots used for
// creating Isolates to be identical. This isn't really memory-safe
// Because it uses a shared readonly-heap, V8 requires all snapshots used
// for creating Isolates to be identical. This isn't really memory-safe
// but also otherwise just doesn't work, and the only real alternative
// is disabling shared-readonly-heap mode altogether.
static Isolate::CreateParams first_params = *params;
params->snapshot_blob = first_params.snapshot_blob;
params->external_references = first_params.external_references;
}
#endif

// Register the isolate on the platform before the isolate gets initialized,
// so that the isolate can access the platform during initialization.
Expand Down
12 changes: 3 additions & 9 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,9 @@ Environment::Environment(IsolateData* isolate_data,
thread_id_(thread_id.id == static_cast<uint64_t>(-1)
? AllocateEnvironmentThreadId().id
: thread_id.id) {
constexpr bool is_shared_ro_heap =
#ifdef NODE_V8_SHARED_RO_HEAP
true;
#else
false;
#endif
if (is_shared_ro_heap && !is_main_thread()) {
// If this is a Worker thread and we are in shared-readonly-heap mode,
// we can always safely use the parent's Isolate's code cache.
if (!is_main_thread()) {
// If this is a Worker thread, we can always safely use the parent's
// Isolate's code cache because of the shared read-only heap.
CHECK_NOT_NULL(isolate_data->worker_context());
builtin_loader()->CopySourceAndCodeCacheReferenceFrom(
isolate_data->worker_context()->env()->builtin_loader());
Expand Down
4 changes: 2 additions & 2 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ class EmbedderSnapshotData {
void ToFile(FILE* out) const;
std::vector<char> ToBlob() const;

// Returns whether custom snapshots can be used. Currently, this means
// that V8 was configured without the shared-readonly-heap feature.
// Returns whether custom snapshots can be used. Currently, this always
// returns false since V8 enforces shared readonly-heap.
static bool CanUseCustomSnapshotPerIsolate();

EmbedderSnapshotData(const EmbedderSnapshotData&) = delete;
Expand Down
3 changes: 3 additions & 0 deletions tools/v8_gypfiles/abseil.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
'include_dirs': [
'<(ABSEIL_ROOT)',
],
'xcode_settings': {
'OTHER_LDFLAGS': ['-framework CoreFoundation'],
},
},
'include_dirs': [
'<(ABSEIL_ROOT)',
Expand Down
10 changes: 3 additions & 7 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
# Enable fast mksnapshot runs.
'v8_enable_fast_mksnapshot%': 0,

# Enable using multiple threads to build builtins in mksnapshot.
'v8_enable_concurrent_mksnapshot%': 1,

# Enable the registration of unwinding info for Windows/x64 and ARM64.
'v8_win64_unwinding_info%': 1,

Expand Down Expand Up @@ -209,10 +212,6 @@
# Controls the threshold for on-heap/off-heap Typed Arrays.
'v8_typed_array_max_size_in_heap%': 64,

# Enable sharing read-only space across isolates.
# Sets -DV8_SHARED_RO_HEAP.
'v8_enable_shared_ro_heap%': 0,

# Enable lazy source positions by default.
'v8_enable_lazy_source_positions%': 1,

Expand Down Expand Up @@ -437,9 +436,6 @@
['v8_use_siphash==1', {
'defines': ['V8_USE_SIPHASH',],
}],
['v8_enable_shared_ro_heap==1', {
'defines': ['V8_SHARED_RO_HEAP',],
}],
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}, {
Expand Down
1 change: 0 additions & 1 deletion tools/v8_gypfiles/inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
'<(inspector_protocol_path)/crdtp/find_by_first.h',
'<(inspector_protocol_path)/crdtp/json.cc',
'<(inspector_protocol_path)/crdtp/json.h',
'<(inspector_protocol_path)/crdtp/maybe.h',
'<(inspector_protocol_path)/crdtp/parser_handler.h',
'<(inspector_protocol_path)/crdtp/protocol_core.cc',
'<(inspector_protocol_path)/crdtp/protocol_core.h',
Expand Down
21 changes: 20 additions & 1 deletion tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,15 @@
'mksnapshot_flags': ['--code-comments'],
},
}],
['v8_enable_concurrent_mksnapshot == 1', {
'variables': {
'mksnapshot_flags': [
'--concurrent-builtin-generation',
# Use all the cores for concurrent builtin generation.
'--concurrent-turbofan-max-threads=0',
],
},
}],
['v8_enable_snapshot_native_code_counters', {
'variables': {
'mksnapshot_flags': ['--native-code-counters'],
Expand Down Expand Up @@ -481,6 +490,7 @@
'v8_compiler_for_mksnapshot',
'v8_initializers',
'v8_libplatform',
'abseil.gyp:abseil',
]
}, {
'dependencies': [
Expand All @@ -493,6 +503,7 @@
'v8_compiler_for_mksnapshot',
'v8_initializers',
'v8_libplatform',
'abseil.gyp:abseil',
]
}],
['OS=="win" and clang==1', {
Expand Down Expand Up @@ -1317,6 +1328,7 @@
'dependencies': [
'v8_shared_internal_headers',
'v8_libbase',
'abseil.gyp:abseil',
],
'defines!': [
'_HAS_EXCEPTIONS=0',
Expand Down Expand Up @@ -1370,6 +1382,7 @@

'dependencies': [
'v8_headers',
'abseil.gyp:abseil',
],

'conditions': [
Expand Down Expand Up @@ -1618,6 +1631,7 @@
'toolsets': ['host', 'target'],
'dependencies': [
'v8_libbase',
'abseil.gyp:abseil',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?sources = ")',
Expand Down Expand Up @@ -1688,7 +1702,8 @@
'BUILDING_V8_SHARED=1',
],
'dependencies': [
"v8_libbase",
'v8_libbase',
'abseil.gyp:abseil',
# "build/win:default_exe_manifest",
],
'sources': [
Expand Down Expand Up @@ -1751,6 +1766,7 @@
'type': 'executable',
'dependencies': [
'torque_base',
'abseil.gyp:abseil',
# "build/win:default_exe_manifest",
],
'conditions': [
Expand Down Expand Up @@ -1826,6 +1842,7 @@
'v8_libbase',
# "build/win:default_exe_manifest",
'v8_maybe_icu',
'abseil.gyp:abseil',
],
'conditions': [
['want_separate_host_toolset', {
Expand Down Expand Up @@ -2074,6 +2091,8 @@
'<(V8_ROOT)/src/objects/abstract-code-inl.h',
'<(V8_ROOT)/src/objects/instruction-stream.h',
'<(V8_ROOT)/src/objects/instruction-stream-inl.h',
'<(V8_ROOT)/src/objects/casting.h',
'<(V8_ROOT)/src/objects/casting-inl.h',
'<(V8_ROOT)/src/objects/code.h',
'<(V8_ROOT)/src/objects/code-inl.h',
'<(V8_ROOT)/src/objects/data-handler.h',
Expand Down