diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index ecfef26bb3a..4069010f4df 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -196,6 +196,13 @@ # Use switch-based dispatch if this is false. 'v8_enable_regexp_interpreter_threaded_dispatch%': 1, + # Disable all snapshot compression. + 'v8_enable_snapshot_compression%': 1, + + # Enable control-flow integrity features, such as pointer authentication + # for ARM64. + 'v8_control_flow_integrity%': 0, + # Variables from v8.gni # Enable ECMAScript Internationalization API. Enabling this feature will @@ -325,6 +332,12 @@ ['v8_enable_regexp_interpreter_threaded_dispatch==1', { 'defines': ['V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH',], }], + ['v8_enable_snapshot_compression==1', { + 'defines': ['V8_SNAPSHOT_COMPRESSION',], + }], + ['v8_control_flow_integrity==1', { + 'defines': ['V8_ENABLE_CONTROL_FLOW_INTEGRITY',], + }], ], # conditions 'defines': [ 'V8_EMBEDDED_BUILTINS', diff --git a/tools/v8_gypfiles/inspector.gypi b/tools/v8_gypfiles/inspector.gypi index ceb904431e5..6f08333ea99 100644 --- a/tools/v8_gypfiles/inspector.gypi +++ b/tools/v8_gypfiles/inspector.gypi @@ -10,8 +10,6 @@ '<(inspector_protocol_path)/lib/base_string_adapter_h.template', '<(inspector_protocol_path)/lib/DispatcherBase_cpp.template', '<(inspector_protocol_path)/lib/DispatcherBase_h.template', - '<(inspector_protocol_path)/lib/ErrorSupport_cpp.template', - '<(inspector_protocol_path)/lib/ErrorSupport_h.template', '<(inspector_protocol_path)/lib/Forward_h.template', '<(inspector_protocol_path)/lib/FrontendChannel_h.template', '<(inspector_protocol_path)/lib/Object_cpp.template', diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index 264b3e478ef..1a738ac8490 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -301,6 +301,11 @@ 'defines': [ 'V8_TARGET_ARCH_ARM64', ], + 'conditions': [ + ['v8_control_flow_integrity==1', { + 'cflags': [ '-mbranch-protection=pac-ret' ], + }], + ], }], ['v8_target_arch=="s390x"', { 'defines': [ diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index b5ad9b0dcb0..3180a386885 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -733,6 +733,15 @@ ['want_separate_host_toolset', { 'toolsets': ['host', 'target'], }], + ['v8_control_flow_integrity==1', { + 'sources': [ + '<(V8_ROOT)/src/execution/arm64/pointer-authentication-arm64.h', + ], + }, { + 'sources': [ + '<(V8_ROOT)/src/execution/pointer-authentication-dummy.h', + ], + }], ['v8_target_arch=="ia32"', { 'sources': [ ### gcmole(arch:ia32) ### '