Skip to content

Commit b411114

Browse files
refacktargos
authored andcommitted
deps: V8: use ATOMIC_VAR_INIT instead of std::atomic_init
`std::atomic_init<size_t>` is not implemented in all platforms. * pragma to ignore `-Wbraced-scalar-init` Backport-PR-URL: #28005 PR-URL: #27375 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent c08d94b commit b411114

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.8',
41+
'v8_embedder_string': '-node.9',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/wasm/module-compiler.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ class CompilationUnitQueues {
131131
queues_[task_id].next_steal_task_id_ = next_task_id(task_id);
132132
}
133133
for (auto& atomic_counter : num_units_) {
134-
std::atomic_init(&atomic_counter, size_t{0});
134+
#ifdef __clang__
135+
#pragma clang diagnostic push
136+
#pragma clang diagnostic ignored "-Wbraced-scalar-init"
137+
#endif
138+
atomic_counter = ATOMIC_VAR_INIT(0);
139+
#ifdef __clang__
140+
#pragma clang diagnostic pop
141+
#endif
135142
}
136143
}
137144

0 commit comments

Comments
 (0)