Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
patches: apply nodejs/node#39839 for vercel/pkg#1155
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Aug 24, 2021
1 parent d0e9788 commit 19ddcec
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
22 changes: 22 additions & 0 deletions patches/node.v12.22.5.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -646,3 +646,25 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
22 changes: 22 additions & 0 deletions patches/node.v14.17.5.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -523,3 +523,25 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
22 changes: 22 additions & 0 deletions patches/node.v16.7.0.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,25 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',

0 comments on commit 19ddcec

Please sign in to comment.