node-libclang
node-libclang copied to clipboard
Regenerate lib/dynamic_clang.js for clang-6.0
Forked and fixed quite a few more things: https://github.com/node-ffi-packager/node-libclang
Note: includes commits from previous pull-requests. Should be merged to master
one by one, but wanted to showcase the stepwise progress and allow for feedback.
- https://github.com/tjfontaine/node-libclang/pull/16
- Generated using
node-ffi-generate
with elaborated type support. - Uses
clang-6.0
, which was released 2018-03-08. - Has not been tested with older
clang
/llvm
versions. - Built on Ubuntu 19.10 Eoan using from
node-ffi-generate
with support for Elaborated types.
ln --symbolic --force "$(which "llvm-config-6.0")" "${HOME}/bin/llvm-config"
llvm-config --version
LD_LIBRARY_PATH="$(llvm-config --libdir)" node ./lib/generateffi.js
NOTE: move the generated newclang.js
to replace lib/dynamic_clang.js
.
See
- https://releases.llvm.org/6.0.0/docs/ReleaseNotes.html
- https://en.wikipedia.org/wiki/Clang
- https://github.com/tjfontaine/node-ffi-generate
- https://github.com/joelpurra/node-ffi-generate/tree/support-elaborated-type
Note that support for Elaborated types (#16) added 1200 or so new lines (100% increase) to lib/dynamic_clang.js
. This includes enums and functions which were not exported before. Saw similar improvements for another library.
Forked and fixed quite a few more things, might help someone: https://github.com/node-ffi-packager/node-libclang