Skip to content

Commit

Permalink
tools: update V8 gypfiles for 11.4
Browse files Browse the repository at this point in the history
PR-URL: #49639
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
targos committed Oct 10, 2023
1 parent 162a065 commit f34a3a9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 24 deletions.
6 changes: 6 additions & 0 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@
'cflags!': [ '-Wall', '-Wextra' ],
'cflags': [ '-Wno-return-type' ],
}],
['clang or OS!="win"', {
'cflags': [ '-Wno-invalid-offsetof' ],
'xcode_settings': {
'WARNING_CFLAGS': ['-Wno-invalid-offsetof']
},
}],
['v8_target_arch=="arm"', {
'defines': [
'V8_TARGET_ARCH_ARM',
Expand Down
63 changes: 39 additions & 24 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
'direct_dependent_settings': {
'sources': [
'<(V8_ROOT)/include/v8-platform.h',
'<(V8_ROOT)/include/v8-source-location.h',
'<(V8_ROOT)/include/v8config.h',
],
},
Expand Down Expand Up @@ -541,6 +542,11 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?sources = ")',
],
'conditions': [
['v8_enable_snapshot_compression==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_snapshot_compression.*?sources \\+= ")',
],
}],
['v8_enable_maglev==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_maglev.*?sources \\+= ")',
Expand Down Expand Up @@ -568,11 +574,6 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?sources \\+= ")',
],
}],
['v8_enable_snapshot_compression==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_snapshot_compression.*?sources \\+= ")',
],
}],
['v8_control_flow_integrity==0', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?!v8_control_flow_integrity.*?sources \\+= ")',
Expand Down Expand Up @@ -602,12 +603,12 @@
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.h',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_win.*?sources \\+= ")',
'<(V8_ROOT)/src/trap-handler/handler-inside-win.h',
],
}],
],
Expand All @@ -631,12 +632,12 @@
}],
['v8_enable_webassembly==1', {
'conditions': [
['OS=="mac" or (_toolset=="host" and host_arch=="x64" and OS=="linux")', {
['((_toolset=="host" and host_arch=="arm64" or _toolset=="target" and target_arch=="arm64") and (OS=="linux" or OS=="mac")) or ((_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux" or OS=="mac"))', {
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.h',
],
}],
['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or OS=="win")', {
['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux" or OS=="mac" or OS=="win")', {
'sources': [
'<(V8_ROOT)/src/trap-handler/trap-handler-simulator.h',
],
Expand Down Expand Up @@ -874,13 +875,6 @@
'<@(inspector_all_sources)',
],
'conditions': [
['v8_enable_third_party_heap==1', {
# TODO(targos): add values from v8_third_party_heap_files to sources
}, {
'sources': [
'<(V8_ROOT)/src/heap/third-party/heap-api-stub.cc',
],
}],
['v8_enable_snapshot_compression==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_snapshot_compression.*?sources \\+= ")',
Expand Down Expand Up @@ -908,6 +902,13 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_webassembly.*?sources \\+= ")',
],
}],
['v8_enable_third_party_heap==1', {
# TODO(targos): add values from v8_third_party_heap_files to sources
}, {
'sources': [
'<(V8_ROOT)/src/heap/third-party/heap-api-stub.cc',
],
}],
['v8_enable_heap_snapshot_verify==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_heap_snapshot_verify.*?sources \\+= ")',
Expand All @@ -932,12 +933,14 @@
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
'<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_win.*?sources \\+= ")',
'<(V8_ROOT)/src/trap-handler/handler-inside-win.cc',
'<(V8_ROOT)/src/trap-handler/handler-outside-win.cc',
],
}],
],
Expand All @@ -956,21 +959,19 @@
'conditions': [
['v8_enable_webassembly==1', {
'conditions': [
['OS=="mac" or OS=="ios" or '
'(_toolset=="host" and host_arch=="x64" and (host_os=="linux" or host_os=="mac"))', {
['((_toolset=="host" and host_arch=="arm64" or _toolset=="target" and target_arch=="arm64") and (OS=="linux" or OS=="mac" or OS=="ios")) or ((_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux" or OS=="mac"))', {
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
'<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
],
}],
['_toolset=="host" and host_arch=="x64" and OS=="win"', {
['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and OS=="win"', {
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-inside-win.cc',
'<(V8_ROOT)/src/trap-handler/handler-outside-win.cc',
],
}],
['_toolset=="host" and host_arch=="x64" and '
'(host_os=="linux" or host_os=="mac" or OS=="win")', {
['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux" or OS=="mac" or OS=="win")', {
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
],
Expand Down Expand Up @@ -1452,7 +1453,6 @@
'<(V8_ROOT)/src/libplatform/tracing/trace-writer.h',
],
'sources': [
'<(V8_ROOT)/src/libplatform/tracing/trace-event-listener.cc',
'<(V8_ROOT)/src/libplatform/tracing/trace-event-listener.h',
],
'dependencies': [
Expand Down Expand Up @@ -1863,10 +1863,20 @@
'<(V8_ROOT)/src/objects/allocation-site-inl.h',
'<(V8_ROOT)/src/objects/cell.h',
'<(V8_ROOT)/src/objects/cell-inl.h',
'<(V8_ROOT)/src/objects/dependent-code.h',
'<(V8_ROOT)/src/objects/dependent-code-inl.h',
'<(V8_ROOT)/src/objects/bytecode-array.h',
'<(V8_ROOT)/src/objects/bytecode-array-inl.h',
'<(V8_ROOT)/src/objects/abstract-code.h',
'<(V8_ROOT)/src/objects/abstract-code-inl.h',
'<(V8_ROOT)/src/objects/instruction-stream.h',
'<(V8_ROOT)/src/objects/instruction-stream-inl.h',
'<(V8_ROOT)/src/objects/code.h',
'<(V8_ROOT)/src/objects/code-inl.h',
'<(V8_ROOT)/src/objects/data-handler.h',
'<(V8_ROOT)/src/objects/data-handler-inl.h',
'<(V8_ROOT)/src/objects/deoptimization-data.h',
'<(V8_ROOT)/src/objects/deoptimization-data-inl.h',
'<(V8_ROOT)/src/objects/descriptor-array.h',
'<(V8_ROOT)/src/objects/descriptor-array-inl.h',
'<(V8_ROOT)/src/objects/feedback-cell.h',
Expand All @@ -1890,6 +1900,9 @@
'<(V8_ROOT)/src/objects/js-objects-inl.h',
'<(V8_ROOT)/src/objects/js-promise.h',
'<(V8_ROOT)/src/objects/js-promise-inl.h',
'<(V8_ROOT)/src/objects/js-raw-json.cc',
'<(V8_ROOT)/src/objects/js-raw-json.h',
'<(V8_ROOT)/src/objects/js-raw-json-inl.h',
'<(V8_ROOT)/src/objects/js-regexp.cc',
'<(V8_ROOT)/src/objects/js-regexp.h',
'<(V8_ROOT)/src/objects/js-regexp-inl.h',
Expand All @@ -1898,6 +1911,8 @@
'<(V8_ROOT)/src/objects/map.cc',
'<(V8_ROOT)/src/objects/map.h',
'<(V8_ROOT)/src/objects/map-inl.h',
'<(V8_ROOT)/src/objects/megadom-handler.h',
'<(V8_ROOT)/src/objects/megadom-handler-inl.h',
'<(V8_ROOT)/src/objects/name.h',
'<(V8_ROOT)/src/objects/name-inl.h',
'<(V8_ROOT)/src/objects/objects.h',
Expand Down

0 comments on commit f34a3a9

Please sign in to comment.