Skip to content

Commit d76c462

Browse files
committed
remove -fcf-protection from non-x86 builds
The -fcf-protection=full flag is now conditional on target_arch=='x64' to prevent build failures on ARM64 architectures (Intel CET is x86-only).
1 parent 67353fe commit d76c462

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

binding.gyp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@
7474
"configurations": {
7575
"Release": {
7676
"conditions": [
77+
# _FORTIFY_SOURCE applies to all Linux architectures
7778
["OS=='linux'", {
78-
"defines+": [ "_FORTIFY_SOURCE=2" ],
79+
"defines+": [ "_FORTIFY_SOURCE=2" ]
80+
}],
81+
# Control Flow Protection only for x86_64 (Intel CET)
82+
["OS=='linux' and target_arch=='x64'", {
7983
"cflags+": [ "-fcf-protection=full" ]
8084
}],
8185
["OS=='win'", {

0 commit comments

Comments
 (0)