Skip to content

Commit b8c972d

Browse files
committed
build: build v8 with -fvisibility=hidden on macOS
V8 should be built with -fvisibility=hidden, otherwise the resulting binary would contain unnecessary symbols. In particular, on macOS, this leads to 5000+ weak symbols resolved at runtime, leading to a startup regression.
1 parent 938a581 commit b8c972d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/v8_gypfiles/v8.gyp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
}
4343
},
4444
},
45+
'xcode_settings': {
46+
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
47+
},
4548
'targets': [
4649
{
4750
'target_name': 'v8_pch',

0 commit comments

Comments
 (0)