8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b66f0f7 commit 1769597Copy full SHA for 1769597
node.gyp
@@ -488,6 +488,19 @@
488
['clang==0 and OS!="win"', {
489
'cflags': [ '-Wno-restrict', ],
490
}],
491
+ # TODO(joyeecheung): investigate if it breaks addons.
492
+ # ['OS=="mac"', {
493
+ # 'xcode_settings': {
494
+ # 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
495
+ # 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES' # -fvisibility-inlines-hidden
496
+ # },
497
+ # }],
498
+ # ['OS!="win" or clang==1', {
499
+ # 'cflags': [
500
+ # '-fvisibility=hidden',
501
+ # '-fvisibility-inlines-hidden'
502
+ # ],
503
504
# Pointer authentication for ARM64.
505
['target_arch=="arm64"', {
506
'target_conditions': [
tools/v8_gypfiles/v8.gyp
@@ -46,22 +46,31 @@
46
}
47
},
48
'conditions': [
49
- ['OS=="mac"', {
50
- # Hide symbols that are not explicitly exported with V8_EXPORT.
51
- # TODO(joyeecheung): enable it on other platforms. Currently gcc times out
52
- # or run out of memory with -fvisibility=hidden on some machines in the CI.
53
- 'xcode_settings': {
54
- 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
55
- },
+ # Build with -fvisibility=hidden and -fvisibility-inlines-hidden to avoid
+ # including unnecessary internal symbols, which may lead to run-time fixups.
+ # This is not done on AIX where symbols are exported by tools/create_expfile.sh
+ # see https://github.com/nodejs/node/pull/56290#issuecomment-2582703109
+ ['OS!="aix"', {
56
'defines': [
57
'BUILDING_V8_SHARED', # Make V8_EXPORT visible.
58
- ],
+ ]
59
60
['node_shared=="true"', {
61
62
'V8_TLS_USED_IN_LIBRARY', # Enable V8_TLS_LIBRARY_MODE.
63
],
64
+ ['OS=="mac"', {
+ 'xcode_settings': {
65
+ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
66
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES' # -fvisibility-inlines-hidden
67
+ },
68
+ }, 'OS!="aix" and (OS!="win" or clang==1)', {
69
+ 'cflags': [
70
+ '-fvisibility=hidden',
71
+ '-fvisibility-inlines-hidden'
72
+ ],
73
+ }], # MSVC hides the non-public symbols by default so no need to configure it.
74
75
76
'targets': [