I'm writing a native module for Node but would like to remove the debugging information. I'm using node-gyp to build the module.
It's doing a release build, but still, the symbol table is included in the output file.
So I need to remove it with the strip Unix command after the build. Is there a way to remove it in the build itself - ie. specify something in the .gyp file?
Furthermore, even after stripping the debug symbols, I can still use
strings [node-module]
And it lists the names of my functions. Is it possible to remove these also?
This is the command I use to build the native module:
node-gyp rebuild --target=v8.9.4
And this is my binding.gyp:
{
"targets": [
{
"libraries": [
"/usr/lib/x86_64-linux-gnu/libudev.so",
"/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0"
],
"target_name": "utils",
"sources": [ "src/native/utils.cpp" ]
}
]
}
Thanks!