Skip to content

Commit

Permalink
Disable LTO to avoid missing symbols in some envs (#415)
Browse files Browse the repository at this point in the history
LTO may not always work correctly, for whatever reason, resulting in
e.g.

> node_modules/argon2/build/Release/argon2.node: undefined symbol: argon2_ctx

Removing LTO seems to be fine, and resolves the above issue.
  • Loading branch information
amarshall authored Aug 25, 2024
1 parent 2afef9c commit c1f756f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Release": {
"target_conditions": [
["OS != 'win'", {
"cflags+": ["-fdata-sections", "-ffunction-sections", "-flto", "-fvisibility=hidden"],
"cflags+": ["-fdata-sections", "-ffunction-sections", "-fvisibility=hidden"],
"ldflags+": ["-Wl,--gc-sections"]
}]
],
Expand Down

0 comments on commit c1f756f

Please sign in to comment.