diff --git a/common.gypi b/common.gypi old mode 100644 new mode 100755 index 38471d4639eb5e3ee5c0da4e117f716b7cc06177..7893a1ab1173d02cdced98f1837e417674b74002 --- a/common.gypi +++ b/common.gypi @@ -340,6 +340,7 @@ }], [ 'target_arch=="arm64"', { 'msvs_configuration_platform': 'arm64', + 'cflags': ['-mbranch-protection=pac-ret+b-key+bti'], }], ['asan == 1 and OS != "mac" and OS != "zos"', { 'cflags+': [ diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi old mode 100644 new mode 100755 index 535cc9ee1fee0d8b50ab7372ca56bec0b9595ca9..365f6c05565490121d35f37682d11af2a7829fde --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -51,6 +51,7 @@ # on the target. 'v8_can_use_vfp32dregs%': 'false', 'arm_test_noprobe%': 'off', + 'arm_control_flow_integrity': 1, # Similar to vfp but on MIPS. 'v8_can_use_fpu_instructions%': 'true', @@ -271,6 +272,9 @@ ['v8_control_flow_integrity==1', { 'cflags': [ '-mbranch-protection=standard' ], }], + ['arm_control_flow_integrity==1', { + 'cflags': [ '-mbranch-protection=pac-ret+b-key+bti' ], + }], ], 'target_conditions': [ ['_toolset == "target"', {