Skip to content

Commit

Permalink
tools: update v8 gypfiles
Browse files Browse the repository at this point in the history
until fe6bd3019d47c8522e2cad2bb52fd82dce906485
  • Loading branch information
targos authored and nodejs-ci committed Mar 3, 2020
1 parent cc83a48 commit 061db16
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 5 deletions.
13 changes: 13 additions & 0 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 0 additions & 2 deletions tools/v8_gypfiles/inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down
60 changes: 57 additions & 3 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x86.*?sources \+= ")',
Expand Down Expand Up @@ -1608,12 +1617,57 @@
{
'target_name': 'v8_zlib',
'type': 'static_library',
'conditions': [
['want_separate_host_toolset', {
'toolsets': ['host', 'target'],
}],
],
'direct_dependent_settings': {
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
],
},
'defines': [ 'ZLIB_IMPLEMENTATION' ],
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
'sources': [ '<(V8_ROOT)/third_party/zlib/adler32.c' ],
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
],
'sources': [
'<(V8_ROOT)/third_party/zlib/adler32.c',
'<(V8_ROOT)/third_party/zlib/chromeconf.h',
'<(V8_ROOT)/third_party/zlib/compress.c',
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
'<(V8_ROOT)/third_party/zlib/cpu_features.c',
'<(V8_ROOT)/third_party/zlib/cpu_features.h',
'<(V8_ROOT)/third_party/zlib/crc32.c',
'<(V8_ROOT)/third_party/zlib/crc32.h',
'<(V8_ROOT)/third_party/zlib/deflate.c',
'<(V8_ROOT)/third_party/zlib/deflate.h',
'<(V8_ROOT)/third_party/zlib/gzclose.c',
'<(V8_ROOT)/third_party/zlib/gzguts.h',
'<(V8_ROOT)/third_party/zlib/gzlib.c',
'<(V8_ROOT)/third_party/zlib/gzread.c',
'<(V8_ROOT)/third_party/zlib/gzwrite.c',
'<(V8_ROOT)/third_party/zlib/infback.c',
'<(V8_ROOT)/third_party/zlib/inffast.c',
'<(V8_ROOT)/third_party/zlib/inffast.h',
'<(V8_ROOT)/third_party/zlib/inffixed.h',
'<(V8_ROOT)/third_party/zlib/inflate.c',
'<(V8_ROOT)/third_party/zlib/inflate.h',
'<(V8_ROOT)/third_party/zlib/inftrees.c',
'<(V8_ROOT)/third_party/zlib/inftrees.h',
'<(V8_ROOT)/third_party/zlib/trees.c',
'<(V8_ROOT)/third_party/zlib/trees.h',
'<(V8_ROOT)/third_party/zlib/uncompr.c',
'<(V8_ROOT)/third_party/zlib/zconf.h',
'<(V8_ROOT)/third_party/zlib/zlib.h',
'<(V8_ROOT)/third_party/zlib/zutil.c',
'<(V8_ROOT)/third_party/zlib/zutil.h',
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.cc',
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.h',
],
}, # v8_zlib
],
}

0 comments on commit 061db16

Please sign in to comment.