Skip to content

Commit

Permalink
contrib/nodejs: try fix riscv64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Apr 24, 2024
1 parent 153bce9 commit a82c5ed
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions contrib/nodejs/patches/riscv-trap-handler.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -779,6 +779,15 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?v8_current_cpu == \\"riscv64\\".*?v8_enable_sparkplug.*?sources \\+= ")',
],
}],
+ ['v8_enable_webassembly==1', {
+ 'conditions': [
+ ['OS=="linux"', {
+ 'sources': [
+ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.h',
+ ],
+ }],
+ ],
+ }],
],
}],
['v8_target_arch=="loong64"', {
@@ -1150,6 +1159,18 @@
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
],
+ 'conditions': [
+ ['v8_enable_webassembly==1', {
+ 'conditions': [
+ ['OS=="linux"', {
+ 'sources': [
+ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
+ '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
+ ],
+ }],
+ ],
+ }],
+ ],
}],
['v8_target_arch=="loong64"', {
'sources': [

0 comments on commit a82c5ed

Please sign in to comment.