Skip to content

Commit 090384f

Browse files
authored
chore: add BinSkim flags to winpty (#767)
* chore: add BinSkim flags to winpty * Apply PR feedback
1 parent 467cea0 commit 090384f

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

deps/winpty/src/winpty.gyp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Add the 'src/gen' directory to the include path and force gyp to
2424
# run the script (re)generating the version header.
2525
'<!(cmd /c "cd shared && UpdateGenVersion.bat <(WINPTY_COMMIT_HASH)")',
26-
],
26+
]
2727
},
2828
'targets' : [
2929
{
@@ -40,12 +40,26 @@
4040
'-lshell32',
4141
'-luser32',
4242
],
43+
'msvs_configuration_attributes': {
44+
'SpectreMitigation': 'Spectre'
45+
},
4346
'msvs_settings': {
4447
# Specify this setting here to override a setting from somewhere
4548
# else, such as node's common.gypi.
4649
'VCCLCompilerTool': {
4750
'ExceptionHandling': '1', # /EHsc
51+
'AdditionalOptions': [
52+
'/guard:cf',
53+
'/w34244',
54+
'/w34267',
55+
'/ZH:SHA_256'
56+
]
4857
},
58+
'VCLinkerTool': {
59+
'AdditionalOptions': [
60+
'/guard:cf'
61+
]
62+
}
4963
},
5064
'sources' : [
5165
'agent/Agent.h',
@@ -128,12 +142,26 @@
128142
'-ladvapi32',
129143
'-luser32',
130144
],
145+
'msvs_configuration_attributes': {
146+
'SpectreMitigation': 'Spectre'
147+
},
131148
'msvs_settings': {
132149
# Specify this setting here to override a setting from somewhere
133150
# else, such as node's common.gypi.
134151
'VCCLCompilerTool': {
135152
'ExceptionHandling': '1', # /EHsc
153+
'AdditionalOptions': [
154+
'/guard:cf',
155+
'/w34244',
156+
'/w34267',
157+
'/ZH:SHA_256'
158+
]
136159
},
160+
'VCLinkerTool': {
161+
'AdditionalOptions': [
162+
'/guard:cf'
163+
]
164+
}
137165
},
138166
'sources' : [
139167
'include/winpty.h',

0 commit comments

Comments
 (0)