[PATCH] tools: fix riscv64 build failed
authorLu Yahan <yahan@iscas.ac.cn>
Mon, 18 Nov 2024 15:41:23 +0000 (23:41 +0800)
committerJérémy Lal <kapouer@melix.org>
Wed, 14 Jan 2026 00:19:18 +0000 (01:19 +0100)
PR-URL: https://github.com/nodejs/node/pull/52888
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Gbp-Pq: Topic build
Gbp-Pq: Name fix-riscv64.patch

tools/v8_gypfiles/v8.gyp

index e38d3d28b9b704538f2ae03fb24ca46f6c35bdb6..caf087c24935a1a0a6a626a3011cfc74dc239a75 100644 (file)
               ],
             }],
           ],
+          'conditions': [
+            ['v8_enable_webassembly==1', {
+              'conditions': [
+                ['((_toolset=="host" and host_arch=="riscv64" or _toolset=="target" and target_arch=="riscv64") and (OS=="linux")) or ((_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux"))', {
+                  'sources': [
+                    '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
+                    '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
+                  ],
+                }],
+                ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', {
+                  'sources': [
+                    '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
+                  ],
+                }],
+              ],
+            }],
+          ],
         }],
         ['v8_target_arch=="arm"', {
           'sources': [