From 3599540347ef25c9c5a5537bf188b77e6a70eaa7 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:39:33 -0800 Subject: [PATCH] Add more flags for BinSkim --- binding.gyp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/binding.gyp b/binding.gyp index c2137c0..66970b0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -5,21 +5,27 @@ "sources": [ "src/foreground-love.cc" ], - 'msvs_configuration_attributes': { - 'SpectreMitigation': 'Spectre' + "cflags": [ + "-O2", + "-D_FORTIFY_SOURCE=2" + ], + "msvs_configuration_attributes": { + "SpectreMitigation": "Spectre" }, - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/guard:cf', - '/we4244', - '/we4267', - '/ZH:SHA_256' + "msvs_settings": { + "VCCLCompilerTool": { + "AdditionalOptions": [ + "/guard:cf", + "/W3", + "/we4244", + "/we4267", + "/ZH:SHA_256" ] }, - 'VCLinkerTool': { - 'AdditionalOptions': [ - '/guard:cf' + "VCLinkerTool": { + "AdditionalOptions": [ + "/DYNAMICBASE", + "/guard:cf" ] } }