From c1f756fad11963f45a10d540ae192c50fe0e20ba Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sun, 25 Aug 2024 03:45:53 -0400 Subject: [PATCH] Disable LTO to avoid missing symbols in some envs (#415) 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. --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 6118fc6..44c7374 100644 --- a/binding.gyp +++ b/binding.gyp @@ -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"] }] ],