Skip to content

Commit fcdd8d1

Browse files
committed
nodejs-22: (riscv64, backport) fix build
Ref: nodejs/node#52888 Ref: nodejs/node#52678
1 parent 42e8915 commit fcdd8d1

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 1613ecb0010f4869d0a9944fcd34fb78bfdb0361 Mon Sep 17 00:00:00 2001
2+
From: Lu Yahan <[email protected]>
3+
Date: Wed, 8 May 2024 16:34:24 +0800
4+
Subject: [PATCH] UPSTREAM: tools: fix riscv64 build failed
5+
6+
Fix build failure on riscv64 since v22.
7+
8+
Ref: https://github.com/nodejs/node/pull/52888
9+
Ref: https://github.com/nodejs/node/issues/52678
10+
---
11+
tools/v8_gypfiles/v8.gyp | 17 +++++++++++++++++
12+
1 file changed, 17 insertions(+)
13+
14+
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
15+
index c680132f80..f0d53831f5 100644
16+
--- a/tools/v8_gypfiles/v8.gyp
17+
+++ b/tools/v8_gypfiles/v8.gyp
18+
@@ -1168,6 +1168,23 @@
19+
'sources': [
20+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
21+
],
22+
+ 'conditions': [
23+
+ ['v8_enable_webassembly==1', {
24+
+ 'conditions': [
25+
+ ['(_toolset=="host" and host_arch=="riscv64" or _toolset=="target" and target_arch=="riscv64") or (_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64")', {
26+
+ 'sources': [
27+
+ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
28+
+ '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
29+
+ ],
30+
+ }],
31+
+ ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', {
32+
+ 'sources': [
33+
+ '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
34+
+ ],
35+
+ }],
36+
+ ],
37+
+ }],
38+
+ ],
39+
}],
40+
['v8_target_arch=="loong64"', {
41+
'sources': [
42+
--
43+
2.47.0
44+

0 commit comments

Comments
 (0)