microsoft / vscode-node-sqlite3

Asynchronous, non-blocking SQLite3 bindings for Node.js
BSD 3-Clause "New" or "Revised" License
34 stars 10 forks source link

Use static linking when compiling for ARM #1

Closed SteveDesmond-ca closed 5 years ago

SteveDesmond-ca commented 5 years ago

When cross-compiling VSCode for ARM, the sqlite binding fails with relocation R_ARM_THM_MOVW_ABS_NC against '_LIB_VERSION' can not be used when making a shared object.

Code that uses this instruction must be compiled as a static library/archive. This PR updates the gyp config to do that when targeting ARM architectures.

The same addition was previously necessary in Atom's keytar bindings around a year ago: https://github.com/atom/node-keytar/blob/master/binding.gyp#L51

SteveDesmond-ca commented 5 years ago

Also, let me know if you'd like me to submit this upstream, or if you're planning on doing that (or if you're planning on this fork diverging)

bpasero commented 5 years ago

@stevedesmond-ca sounds good, but can we keep changes that diverge in the vscode branch? Also your change seems to contain some whitespace changes.

SteveDesmond-ca commented 5 years ago

Closing in favor of #5