Skip to content

Commit 4d7a795

Browse files
committed
tools: sync gypfiles with V8 7.6
Co-authored-by: Refael Ackermann (רפאל פלחי) <[email protected]> Co-authored-by: Ujjwal Sharma <[email protected]> Backport-PR-URL: #28955 PR-URL: #28016 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann (רפאל פלחי) <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 7d411f4 commit 4d7a795

File tree

7 files changed

+208
-1723
lines changed

7 files changed

+208
-1723
lines changed

tools/msvs/pch/v8_pch.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#include "src/api-inl.h"
1+
#include "src/api/api-inl.h"
22
#include "src/ast/ast.h"
33
#include "src/builtins/builtins-definitions.h"
4-
#include "src/code-stub-assembler.h"
5-
#include "src/globals.h"
6-
#include "src/objects-inl.h"
4+
#include "src/common/globals.h"
5+
#include "src/objects/objects-inl.h"
76
#include "src/objects/dictionary-inl.h"
87
#include "src/objects/js-objects-inl.h"
98
#include "src/objects/fixed-array-inl.h"
10-
#include "src/utils.h"
11-
#include "src/vector.h"
9+
#include "src/utils/utils.h"
10+
#include "src/utils/vector.h"
1211

1312

1413
#include <algorithm>

tools/v8_gypfiles/GN-scraper.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2019 Refael Ackeramnn<[email protected]>. All rights reserved.
2+
# Use of this source code is governed by an MIT-style license.
3+
import re
4+
import os
5+
6+
PLAIN_SOURCE_RE = re.compile('\s*"([^/$].+)"\s*')
7+
def DoMain(args):
8+
gn_filename, pattern = args
9+
src_root = os.path.dirname(gn_filename)
10+
with open(gn_filename, 'r') as gn_file:
11+
gn_content = gn_file.read().encode('utf-8')
12+
13+
scraper_re = re.compile(pattern + r'\[([^\]]+)', re.DOTALL)
14+
matches = scraper_re.search(gn_content)
15+
match = matches.group(1)
16+
files = []
17+
for l in match.splitlines():
18+
m2 = PLAIN_SOURCE_RE.match(l)
19+
if not m2:
20+
continue
21+
files.append(m2.group(1))
22+
# always use `/` since GYP will process paths further downstream
23+
rel_files = ['"%s/%s"' % (src_root, f) for f in files]
24+
return ' '.join(rel_files)

tools/v8_gypfiles/d8.gyp

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
'<(SHARED_INTERMEDIATE_DIR)',
2727
],
2828
'sources': [
29-
'<(V8_ROOT)/src/async-hooks-wrapper.cc',
30-
'<(V8_ROOT)/src/async-hooks-wrapper.h',
31-
'<(V8_ROOT)/src/d8-console.cc',
32-
'<(V8_ROOT)/src/d8-console.h',
33-
'<(V8_ROOT)/src/d8-js.cc',
34-
'<(V8_ROOT)/src/d8-platforms.cc',
35-
'<(V8_ROOT)/src/d8-platforms.h',
36-
'<(V8_ROOT)/src/d8.cc',
37-
'<(V8_ROOT)/src/d8.h',
29+
'<(V8_ROOT)/src/d8/async-hooks-wrapper.cc',
30+
'<(V8_ROOT)/src/d8/async-hooks-wrapper.h',
31+
'<(V8_ROOT)/src/d8/d8-console.cc',
32+
'<(V8_ROOT)/src/d8/d8-console.h',
33+
'<(V8_ROOT)/src/d8/d8-js.cc',
34+
'<(V8_ROOT)/src/d8/d8-platforms.cc',
35+
'<(V8_ROOT)/src/d8/d8-platforms.h',
36+
'<(V8_ROOT)/src/d8/d8.cc',
37+
'<(V8_ROOT)/src/d8/d8.h',
3838
],
3939
'conditions': [
4040
[ 'want_separate_host_toolset==1', {
@@ -46,10 +46,10 @@
4646
['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
4747
or OS=="openbsd" or OS=="solaris" or OS=="android" \
4848
or OS=="qnx" or OS=="aix")', {
49-
'sources': [ '<(V8_ROOT)/src/d8-posix.cc', ]
49+
'sources': [ '<(V8_ROOT)/src/d8/d8-posix.cc', ]
5050
}],
5151
[ 'OS=="win"', {
52-
'sources': [ '<(V8_ROOT)/src/d8-windows.cc', ]
52+
'sources': [ '<(V8_ROOT)/src/d8/d8-windows.cc', ]
5353
}],
5454
[ 'component!="shared_library"', {
5555
'conditions': [

tools/v8_gypfiles/extras-libraries.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// want to make changes to this file you should either change the
55
// javascript source files or the GYP script.
66

7-
#include "src/v8.h"
7+
#include "src/init/v8.h"
88
#include "src/snapshot/natives.h"
9-
#include "src/utils.h"
9+
#include "src/utils/utils.h"
1010

1111
namespace v8 {
1212
namespace internal {

tools/v8_gypfiles/features.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
'v8_enable_embedded_builtins%': 1,
114114

115115
# Enable the registration of unwinding info for Windows/x64.
116-
'v8_win64_unwinding_info%': 0,
116+
'v8_win64_unwinding_info%': 1,
117117

118118
# Enable code comments for builtins in the snapshot (impacts performance).
119119
'v8_enable_snapshot_code_comments%': 0,

tools/v8_gypfiles/inspector.gypi

+8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
'<(V8_ROOT)/src/inspector/v8-heap-profiler-agent-impl.h',
6767
'<(V8_ROOT)/src/inspector/v8-inspector-impl.cc',
6868
'<(V8_ROOT)/src/inspector/v8-inspector-impl.h',
69+
'<(V8_ROOT)/src/inspector/v8-inspector-protocol-encoding.cc',
70+
'<(V8_ROOT)/src/inspector/v8-inspector-protocol-encoding.h',
6971
'<(V8_ROOT)/src/inspector/v8-inspector-session-impl.cc',
7072
'<(V8_ROOT)/src/inspector/v8-inspector-session-impl.h',
7173
'<(V8_ROOT)/src/inspector/v8-profiler-agent-impl.cc',
@@ -84,6 +86,12 @@
8486
'<(V8_ROOT)/src/inspector/value-mirror.h',
8587
'<(V8_ROOT)/src/inspector/wasm-translation.cc',
8688
'<(V8_ROOT)/src/inspector/wasm-translation.h',
89+
# Flat merge `third_party/inspector_protocol:inspector_string_conversions`
90+
'<(inspector_path)/v8-string-conversions.cc',
91+
'<(inspector_path)/v8-string-conversions.h',
92+
# Flat merge `third_party/inspector_protocol:encoding`
93+
'<(inspector_protocol_path)/encoding/encoding.cc',
94+
'<(inspector_protocol_path)/encoding/encoding.h',
8795
]
8896
},
8997
'include_dirs': [

0 commit comments

Comments
 (0)