Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c7f674d
deps: update V8 to 13.3.415.20
targos Feb 7, 2025
f5987ab
build: reset embedder string to "-node.0"
targos Feb 7, 2025
cf32db3
src: update NODE_MODULE_VERSION to 135
targos Feb 7, 2025
5bb479d
deps: always define V8_EXPORT_PRIVATE as no-op
targos Sep 21, 2022
2aef73a
deps: disable V8 concurrent sparkplug compilation
targos Apr 6, 2023
33d5f38
deps: patch V8 to avoid duplicated zlib symbol
targos Sep 16, 2023
491a5b2
deps: patch V8 to support compilation with MSVC
StefanStojanovic Apr 21, 2024
d2774c2
deps: fix FP16 bitcasts.h
StefanStojanovic May 28, 2024
ee32ce1
deps: always define V8_NODISCARD as no-op
targos Aug 8, 2024
1e48040
deps: define V8_PRESERVE_MOST as no-op on Windows
StefanStojanovic Dec 16, 2024
b3eaf29
build: remove support for s390 32-bit
richardlau Sep 18, 2024
7fc4386
build: enable shared RO heap with ptr compression
targos Sep 21, 2024
81883b0
tools: update V8 gypfiles for 13.1
targos Sep 25, 2024
2ef20c6
tools: update V8 gypfiles for 13.2
targos Oct 28, 2024
2df68dd
build,src,tools: adapt build config for V8 13.3
targos Dec 19, 2024
b3ca191
build: add `/bigobj` to compile V8 on Windows
targos Feb 5, 2025
1c85fc7
src: replace uses of FastApiTypedArray
targos Feb 8, 2025
c68131c
Revert "test: disable fast API call count checks"
targos Jan 31, 2025
dec5890
test: update test-linux-perf-logger
targos Feb 4, 2025
a4064bf
test: adapt assert tests to stack trace changes
targos Dec 20, 2024
fa3d23b
src: lock the isolate properly in IsolateData destructor
joyeecheung Feb 13, 2025
a1ecc28
test: use v8::Locker to lock isolates properly in cctest
joyeecheung Feb 13, 2025
ebe4dca
deps: fix v8::String namespace
joyeecheung Feb 14, 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 committed Feb 7, 2025
commit 2df68ddd5f6ef2c41ef961059872adc7cf8b63f7
7 changes: 0 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,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 @@ -1675,7 +1669,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 @@ -96,9 +96,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 @@ -347,11 +347,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 @@ -308,17 +308,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 @@ -825,15 +825,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 @@ -541,8 +541,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
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
24 changes: 23 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',
'v8_abseil',
]
}, {
'dependencies': [
Expand All @@ -493,6 +503,7 @@
'v8_compiler_for_mksnapshot',
'v8_initializers',
'v8_libplatform',
'v8_abseil',
]
}],
['OS=="win" and clang==1', {
Expand Down Expand Up @@ -1264,6 +1275,7 @@
'dependencies': [
'v8_shared_internal_headers',
'v8_libbase',
'v8_abseil',
],
'defines!': [
'_HAS_EXCEPTIONS=0',
Expand Down Expand Up @@ -1317,6 +1329,7 @@

'dependencies': [
'v8_headers',
'v8_abseil',
],

'conditions': [
Expand Down Expand Up @@ -1565,6 +1578,7 @@
'toolsets': ['host', 'target'],
'dependencies': [
'v8_libbase',
'v8_abseil',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?sources = ")',
Expand Down Expand Up @@ -1635,7 +1649,8 @@
'BUILDING_V8_SHARED=1',
],
'dependencies': [
"v8_libbase",
'v8_libbase',
'v8_abseil',
# "build/win:default_exe_manifest",
],
'sources': [
Expand Down Expand Up @@ -1698,6 +1713,7 @@
'type': 'executable',
'dependencies': [
'torque_base',
'v8_abseil',
# "build/win:default_exe_manifest",
],
'conditions': [
Expand Down Expand Up @@ -1773,6 +1789,7 @@
'v8_libbase',
# "build/win:default_exe_manifest",
'v8_maybe_icu',
'v8_abseil',
],
'conditions': [
['want_separate_host_toolset', {
Expand Down Expand Up @@ -2021,6 +2038,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 Expand Up @@ -2186,6 +2205,9 @@
'include_dirs': [
'<(ABSEIL_ROOT)',
],
'xcode_settings': {
'OTHER_LDFLAGS': ['-framework CoreFoundation'],
},
},
'include_dirs': [
'<(ABSEIL_ROOT)',
Expand Down