Skip to content

Commit

Permalink
Encapsulate the internal SQLite (#684)
Browse files Browse the repository at this point in the history
Add linker flags to
 - prevent the dynamic linker from using an external SQLite for this
   library (`-Bsymbolic`) and
 - prevent the dynamic linker from using the internal SQLite for other
   libraries (`--exclude-libs ALL`).

This is just a (conflict-free) cherry-pick of a Signal-specific fix in
signalapp/better-sqlite3#3 that seems OK to
upstream further.
  • Loading branch information
heftig authored Aug 23, 2021
1 parent 1fa3c77 commit 23c56aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-std=c++14', '-stdlib=libc++'],
},
'conditions': [
['OS=="linux"', {
'ldflags': [
'-Wl,-Bsymbolic',
'-Wl,--exclude-libs,ALL',
],
}],
],
},
{
'target_name': 'test_extension',
Expand Down

0 comments on commit 23c56aa

Please sign in to comment.