Skip to content

Commit

Permalink
tools: sync gypfiles with V8 7.6
Browse files Browse the repository at this point in the history
Co-authored-by: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Co-authored-by: Ujjwal Sharma <usharma1998@gmail.com>

Backport-PR-URL: #28955
PR-URL: #28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
targos committed Aug 16, 2019
1 parent 7d411f4 commit 4d7a795
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 1,723 deletions.
11 changes: 5 additions & 6 deletions tools/msvs/pch/v8_pch.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include "src/api-inl.h"
#include "src/api/api-inl.h"
#include "src/ast/ast.h"
#include "src/builtins/builtins-definitions.h"
#include "src/code-stub-assembler.h"
#include "src/globals.h"
#include "src/objects-inl.h"
#include "src/common/globals.h"
#include "src/objects/objects-inl.h"
#include "src/objects/dictionary-inl.h"
#include "src/objects/js-objects-inl.h"
#include "src/objects/fixed-array-inl.h"
#include "src/utils.h"
#include "src/vector.h"
#include "src/utils/utils.h"
#include "src/utils/vector.h"


#include <algorithm>
Expand Down
24 changes: 24 additions & 0 deletions tools/v8_gypfiles/GN-scraper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2019 Refael Ackeramnn<refack@gmail.com>. All rights reserved.
# Use of this source code is governed by an MIT-style license.
import re
import os

PLAIN_SOURCE_RE = re.compile('\s*"([^/$].+)"\s*')
def DoMain(args):
gn_filename, pattern = args
src_root = os.path.dirname(gn_filename)
with open(gn_filename, 'r') as gn_file:
gn_content = gn_file.read().encode('utf-8')

scraper_re = re.compile(pattern + r'\[([^\]]+)', re.DOTALL)
matches = scraper_re.search(gn_content)
match = matches.group(1)
files = []
for l in match.splitlines():
m2 = PLAIN_SOURCE_RE.match(l)
if not m2:
continue
files.append(m2.group(1))
# always use `/` since GYP will process paths further downstream
rel_files = ['"%s/%s"' % (src_root, f) for f in files]
return ' '.join(rel_files)
22 changes: 11 additions & 11 deletions tools/v8_gypfiles/d8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
'<(SHARED_INTERMEDIATE_DIR)',
],
'sources': [
'<(V8_ROOT)/src/async-hooks-wrapper.cc',
'<(V8_ROOT)/src/async-hooks-wrapper.h',
'<(V8_ROOT)/src/d8-console.cc',
'<(V8_ROOT)/src/d8-console.h',
'<(V8_ROOT)/src/d8-js.cc',
'<(V8_ROOT)/src/d8-platforms.cc',
'<(V8_ROOT)/src/d8-platforms.h',
'<(V8_ROOT)/src/d8.cc',
'<(V8_ROOT)/src/d8.h',
'<(V8_ROOT)/src/d8/async-hooks-wrapper.cc',
'<(V8_ROOT)/src/d8/async-hooks-wrapper.h',
'<(V8_ROOT)/src/d8/d8-console.cc',
'<(V8_ROOT)/src/d8/d8-console.h',
'<(V8_ROOT)/src/d8/d8-js.cc',
'<(V8_ROOT)/src/d8/d8-platforms.cc',
'<(V8_ROOT)/src/d8/d8-platforms.h',
'<(V8_ROOT)/src/d8/d8.cc',
'<(V8_ROOT)/src/d8/d8.h',
],
'conditions': [
[ 'want_separate_host_toolset==1', {
Expand All @@ -46,10 +46,10 @@
['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
or OS=="openbsd" or OS=="solaris" or OS=="android" \
or OS=="qnx" or OS=="aix")', {
'sources': [ '<(V8_ROOT)/src/d8-posix.cc', ]
'sources': [ '<(V8_ROOT)/src/d8/d8-posix.cc', ]
}],
[ 'OS=="win"', {
'sources': [ '<(V8_ROOT)/src/d8-windows.cc', ]
'sources': [ '<(V8_ROOT)/src/d8/d8-windows.cc', ]
}],
[ 'component!="shared_library"', {
'conditions': [
Expand Down
4 changes: 2 additions & 2 deletions tools/v8_gypfiles/extras-libraries.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// want to make changes to this file you should either change the
// javascript source files or the GYP script.

#include "src/v8.h"
#include "src/init/v8.h"
#include "src/snapshot/natives.h"
#include "src/utils.h"
#include "src/utils/utils.h"

namespace v8 {
namespace internal {
Expand Down
2 changes: 1 addition & 1 deletion tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
'v8_enable_embedded_builtins%': 1,

# Enable the registration of unwinding info for Windows/x64.
'v8_win64_unwinding_info%': 0,
'v8_win64_unwinding_info%': 1,

# Enable code comments for builtins in the snapshot (impacts performance).
'v8_enable_snapshot_code_comments%': 0,
Expand Down
8 changes: 8 additions & 0 deletions tools/v8_gypfiles/inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
'<(V8_ROOT)/src/inspector/v8-heap-profiler-agent-impl.h',
'<(V8_ROOT)/src/inspector/v8-inspector-impl.cc',
'<(V8_ROOT)/src/inspector/v8-inspector-impl.h',
'<(V8_ROOT)/src/inspector/v8-inspector-protocol-encoding.cc',
'<(V8_ROOT)/src/inspector/v8-inspector-protocol-encoding.h',
'<(V8_ROOT)/src/inspector/v8-inspector-session-impl.cc',
'<(V8_ROOT)/src/inspector/v8-inspector-session-impl.h',
'<(V8_ROOT)/src/inspector/v8-profiler-agent-impl.cc',
Expand All @@ -84,6 +86,12 @@
'<(V8_ROOT)/src/inspector/value-mirror.h',
'<(V8_ROOT)/src/inspector/wasm-translation.cc',
'<(V8_ROOT)/src/inspector/wasm-translation.h',
# Flat merge `third_party/inspector_protocol:inspector_string_conversions`
'<(inspector_path)/v8-string-conversions.cc',
'<(inspector_path)/v8-string-conversions.h',
# Flat merge `third_party/inspector_protocol:encoding`
'<(inspector_protocol_path)/encoding/encoding.cc',
'<(inspector_protocol_path)/encoding/encoding.h',
]
},
'include_dirs': [
Expand Down
Loading

0 comments on commit 4d7a795

Please sign in to comment.