Skip to content

Commit

Permalink
build: build v8 with -fvisibility=hidden on macOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joyeecheung committed Dec 16, 2024
1 parent 938a581 commit b8c972d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
}
},
},
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
},
'targets': [
{
'target_name': 'v8_pch',
Expand Down

0 comments on commit b8c972d

Please sign in to comment.