Skip to content

Commit 5fe74aa

Browse files
targosBethGriggs
authored andcommitted
tools: update V8 gypfiles for 9.2
Backport-PR-URL: #39470 PR-URL: #38990 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 7f7cb8b commit 5fe74aa

File tree

2 files changed

+50
-22
lines changed

2 files changed

+50
-22
lines changed

tools/v8_gypfiles/features.gypi

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@
6262
}, {
6363
'is_component_build': 0,
6464
}],
65+
['OS == "win" or OS == "mac"', {
66+
# Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
67+
'v8_enable_system_instrumentation': 1,
68+
}, {
69+
'v8_enable_system_instrumentation': 0,
70+
}],
6571
],
6672
'is_debug%': 0,
6773

@@ -160,10 +166,6 @@
160166
# Controls the threshold for on-heap/off-heap Typed Arrays.
161167
'v8_typed_array_max_size_in_heap%': 64,
162168

163-
# Temporary flag to allow embedders to update their microtasks scopes
164-
# while rolling in a new version of V8.
165-
'v8_check_microtasks_scopes_consistency%': 0,
166-
167169
# Enable mitigations for executing untrusted code.
168170
'v8_untrusted_code_mitigations%': 1,
169171

@@ -327,9 +329,6 @@
327329
['v8_enable_lazy_source_positions==1', {
328330
'defines': ['V8_ENABLE_LAZY_SOURCE_POSITIONS',],
329331
}],
330-
['v8_check_microtasks_scopes_consistency==1', {
331-
'defines': ['V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY',],
332-
}],
333332
['v8_use_siphash==1', {
334333
'defines': ['V8_USE_SIPHASH',],
335334
}],
@@ -360,6 +359,9 @@
360359
['v8_enable_precise_zone_stats==1', {
361360
'defines': ['V8_ENABLE_PRECISE_ZONE_STATS',],
362361
}],
362+
['v8_enable_system_instrumentation==1', {
363+
'defines': ['V8_ENABLE_SYSTEM_INSTRUMENTATION',],
364+
}],
363365
['v8_enable_webassembly==1', {
364366
'defines': ['V8_ENABLE_WEBASSEMBLY',],
365367
}],

tools/v8_gypfiles/v8.gyp

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@
671671
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"s390\\".*?sources \\+= ")',
672672
],
673673
}],
674+
['v8_target_arch=="riscv64"', {
675+
'sources': [
676+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
677+
],
678+
}],
674679
],
675680
},
676681
}, # v8_internal_headers
@@ -856,11 +861,6 @@
856861
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips\\".*?sources \\+= ")',
857862
],
858863
}],
859-
['v8_target_arch=="riscv64"', {
860-
'sources': [ ### gcmole(arch:riscv64) ###
861-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"riscv64.*?sources \+= ")',
862-
],
863-
}],
864864
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
865865
'sources': [
866866
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64\\".*?sources \\+= ")',
@@ -881,6 +881,11 @@
881881
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390\\".*?sources \\+= ")',
882882
],
883883
}],
884+
['v8_target_arch=="riscv64"', {
885+
'sources': [
886+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
887+
],
888+
}],
884889
['OS=="win"', {
885890
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
886891
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
@@ -895,6 +900,13 @@
895900
'ObjectFile': '$(IntDir)%(Extension)\\',
896901
},
897902
},
903+
'conditions': [
904+
['v8_enable_system_instrumentation==1', {
905+
'sources': [
906+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?is_win.*?v8_enable_system_instrumentation.*?sources \\+= ")',
907+
],
908+
}],
909+
],
898910
}],
899911
['component=="shared_library"', {
900912
'defines': [
@@ -1133,9 +1145,11 @@
11331145
'<(V8_ROOT)/src/base/platform/platform-win32.cc',
11341146
'<(V8_ROOT)/src/base/win32-headers.h',
11351147
],
1136-
'conditions': [['target_arch == "arm64"', {
1137-
'defines': ['_WIN32_WINNT=0x0602'], # For GetCurrentThreadStackLimits on Windows on Arm
1138-
}]],
1148+
'conditions': [
1149+
['target_arch == "arm64"', {
1150+
'defines': ['_WIN32_WINNT=0x0602'], # For GetCurrentThreadStackLimits on Windows on Arm
1151+
}],
1152+
],
11391153
'defines': ['_CRT_RAND_S'], # for rand_s()
11401154
'direct_dependent_settings': {
11411155
'msvs_settings': {
@@ -1147,6 +1161,17 @@
11471161
]
11481162
}
11491163
},
1164+
'conditions': [
1165+
['v8_enable_system_instrumentation==1', {
1166+
'msvs_settings': {
1167+
'VCLinkerTool': {
1168+
'AdditionalDependencies': [
1169+
'advapi32.lib',
1170+
],
1171+
},
1172+
},
1173+
}],
1174+
],
11501175
},
11511176
}],
11521177
['target_arch == "mips" or OS == "mips64"', {
@@ -1288,8 +1313,6 @@
12881313
'<(V8_ROOT)/src/libplatform/delayed-task-queue.h',
12891314
'<(V8_ROOT)/src/libplatform/task-queue.cc',
12901315
'<(V8_ROOT)/src/libplatform/task-queue.h',
1291-
'<(V8_ROOT)/src/libplatform/tracing/recorder-default.cc',
1292-
'<(V8_ROOT)/src/libplatform/tracing/recorder.h',
12931316
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.cc',
12941317
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.h',
12951318
'<(V8_ROOT)/src/libplatform/tracing/trace-config.cc',
@@ -1313,7 +1336,6 @@
13131336
['v8_use_perfetto==1', {
13141337
'sources!': [
13151338
'<(V8_ROOT)/base/trace_event/common/trace_event_common.h',
1316-
'<(V8_ROOT)/src/libplatform/tracing/recorder-default.cc',
13171339
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.cc',
13181340
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.h',
13191341
'<(V8_ROOT)/src/libplatform/tracing/trace-object.cc',
@@ -1329,14 +1351,18 @@
13291351
'<(V8_ROOT)/third_party/perfetto/protos/perfetto/trace:lite',
13301352
],
13311353
}],
1332-
['v8_use_perfetto==0 and is_win', {
1333-
'sources!': [
1334-
'<(V8_ROOT)/src/libplatform/tracing/recorder-default.cc',
1335-
],
1354+
['v8_enable_system_instrumentation==1 and is_win', {
13361355
'sources': [
1356+
'<(V8_ROOT)/src/libplatform/tracing/recorder.h',
13371357
'<(V8_ROOT)/src/libplatform/tracing/recorder-win.cc',
13381358
],
13391359
}],
1360+
['v8_enable_system_instrumentation==1 and OS=="mac"', {
1361+
'sources': [
1362+
'<(V8_ROOT)/src/libplatform/tracing/recorder.h',
1363+
'<(V8_ROOT)/src/libplatform/tracing/recorder-mac.cc',
1364+
],
1365+
}],
13401366
],
13411367
'direct_dependent_settings': {
13421368
'include_dirs': [

0 commit comments

Comments
 (0)