Skip to content

Commit f9934aa

Browse files
hashseedCommit Bot
authored andcommitted
[gyp] move gyp files from src to gypfiles.
Bug: v8:7341 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I90879be3a94745859b7da7c9bb9b6533af11cc2d Reviewed-on: https://chromium-review.googlesource.com/878221 Reviewed-by: Michael Achenbach <[email protected]> Commit-Queue: Yang Guo <[email protected]> Cr-Commit-Position: refs/heads/master@{#50790}
1 parent 15605fe commit f9934aa

File tree

35 files changed

+2929
-2993
lines changed

35 files changed

+2929
-2993
lines changed

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,10 @@ GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
278278
gypfiles/standalone.gypi \
279279
gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \
280280
test/cctest/cctest.gyp test/fuzzer/fuzzer.gyp \
281-
test/unittests/unittests.gyp src/v8.gyp \
281+
test/unittests/unittests.gyp gypfiles/v8.gyp \
282282
tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
283-
samples/samples.gyp src/third_party/vtune/v8vtune.gyp src/d8.gyp
283+
gypfiles/samples.gyp gypfiles/v8vtune.gyp gypfiles/d8.gyp
284284

285-
# If vtunejit=on, the v8vtune.gyp will be appended.
286-
ifeq ($(vtunejit), on)
287-
GYPFILES += src/third_party/vtune/v8vtune.gyp
288-
endif
289285
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
290286
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
291287
ANDROID_BUILDS = $(foreach mode,$(MODES), \

PRESUBMIT.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def _CheckMissingFiles(input_api, output_api):
239239
# eval-ed and thus doesn't have __file__.
240240
original_sys_path = sys.path
241241
try:
242-
sys.path = sys.path + [input_api.os_path.join(
243-
input_api.PresubmitLocalPath(), 'tools')]
242+
sys.path = [input_api.os_path.join(input_api.PresubmitLocalPath(),
243+
'gypfiles')] + sys.path
244244
from verify_source_deps import missing_gn_files, missing_gyp_files
245245
finally:
246246
# Restore sys.path to what it was before.
@@ -249,6 +249,7 @@ def _CheckMissingFiles(input_api, output_api):
249249
gn_files = missing_gn_files()
250250
gyp_files = missing_gyp_files()
251251
results = []
252+
252253
if gn_files:
253254
results.append(output_api.PresubmitError(
254255
"You added one or more source files but didn't update the\n"
@@ -266,8 +267,6 @@ def _CommonChecks(input_api, output_api):
266267
"""Checks common to both upload and commit."""
267268
results = []
268269
results.extend(_CheckCommitMessageBugEntry(input_api, output_api))
269-
results.extend(input_api.canned_checks.CheckOwners(
270-
input_api, output_api, source_file_filter=None))
271270
results.extend(input_api.canned_checks.CheckPatchFormatted(
272271
input_api, output_api))
273272
results.extend(input_api.canned_checks.CheckGenderNeutral(

gypfiles/all.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'target_name': 'All',
99
'type': 'none',
1010
'dependencies': [
11-
'../src/d8.gyp:d8',
11+
'../gypfiles/d8.gyp:d8',
1212
'../test/inspector/inspector.gyp:*',
1313
'../test/mkgrokdump/mkgrokdump.gyp:*',
1414
],
@@ -21,7 +21,7 @@
2121
# These items don't compile for Android on Mac.
2222
['host_os!="mac" or OS!="android"', {
2323
'dependencies': [
24-
'../samples/samples.gyp:*',
24+
'samples.gyp:*',
2525
'../test/cctest/cctest.gyp:*',
2626
'../test/fuzzer/fuzzer.gyp:*',
2727
'../test/unittests/unittests.gyp:*',

src/d8.gyp renamed to gypfiles/d8.gyp

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
# Copyright 2012 the V8 project authors. All rights reserved.
2-
# Redistribution and use in source and binary forms, with or without
3-
# modification, are permitted provided that the following conditions are
4-
# met:
5-
#
6-
# * Redistributions of source code must retain the above copyright
7-
# notice, this list of conditions and the following disclaimer.
8-
# * Redistributions in binary form must reproduce the above
9-
# copyright notice, this list of conditions and the following
10-
# disclaimer in the documentation and/or other materials provided
11-
# with the distribution.
12-
# * Neither the name of Google Inc. nor the names of its
13-
# contributors may be used to endorse or promote products derived
14-
# from this software without specific prior written permission.
15-
#
16-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18-
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19-
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20-
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21-
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22-
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24-
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25-
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
# Copyright 2018 the V8 project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
274

285
{
296
'variables': {
@@ -32,7 +9,7 @@
329
'v8_enable_vtunejit%': 0,
3310
'v8_enable_i18n_support%': 1,
3411
},
35-
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
12+
'includes': ['toolchain.gypi', 'features.gypi'],
3613
'targets': [
3714
{
3815
'target_name': 'd8',
@@ -48,10 +25,10 @@
4825
'<(DEPTH)',
4926
],
5027
'sources': [
51-
'd8.h',
52-
'd8.cc',
53-
'd8-console.h',
54-
'd8-console.cc',
28+
'../src/d8.h',
29+
'../src/d8.cc',
30+
'../src/d8-console.h',
31+
'../src/d8-console.cc',
5532
'<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
5633
],
5734
'conditions': [
@@ -68,10 +45,10 @@
6845
['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
6946
or OS=="openbsd" or OS=="solaris" or OS=="android" \
7047
or OS=="qnx" or OS=="aix")', {
71-
'sources': [ 'd8-posix.cc', ]
48+
'sources': [ '../src/d8-posix.cc', ]
7249
}],
7350
[ 'OS=="win"', {
74-
'sources': [ 'd8-windows.cc', ]
51+
'sources': [ '../src/d8-windows.cc', ]
7552
}],
7653
[ 'component!="shared_library"', {
7754
'conditions': [
@@ -86,7 +63,7 @@
8663
}],
8764
['v8_enable_vtunejit==1', {
8865
'dependencies': [
89-
'../src/third_party/vtune/v8vtune.gyp:v8_vtune',
66+
'v8vtune.gyp:v8_vtune',
9067
],
9168
}],
9269
['v8_enable_i18n_support==1', {
@@ -107,8 +84,8 @@
10784
'type': 'none',
10885
'variables': {
10986
'js_files': [
110-
'd8.js',
111-
'js/macros.py',
87+
'../src/d8.js',
88+
'../src/js/macros.py',
11289
],
11390
},
11491
'conditions': [
@@ -149,10 +126,10 @@
149126
'd8',
150127
],
151128
'includes': [
152-
'../gypfiles/isolate.gypi',
129+
'isolate.gypi',
153130
],
154131
'sources': [
155-
'd8.isolate',
132+
'../src/d8.isolate',
156133
],
157134
},
158135
],
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
{
66
'variables': {
7-
'protocol_path': '../../third_party/inspector_protocol',
7+
'protocol_path': '../third_party/inspector_protocol',
8+
'inspector_path': '../src/inspector',
89
},
910
'includes': [
1011
'inspector.gypi',
11-
'<(PRODUCT_DIR)/../../../third_party/inspector_protocol/inspector_protocol.gypi',
12+
'../third_party/inspector_protocol/inspector_protocol.gypi',
1213
],
1314
'targets': [
1415
{ 'target_name': 'inspector_injected_script',
@@ -18,17 +19,17 @@
1819
{
1920
'action_name': 'convert_js_to_cpp_char_array',
2021
'inputs': [
21-
'build/xxd.py',
22+
'<(inspector_path)/build/xxd.py',
2223
'<(inspector_injected_script_source)',
2324
],
2425
'outputs': [
2526
'<(inspector_generated_injected_script)',
2627
],
2728
'action': [
2829
'python',
29-
'build/xxd.py',
30+
'<(inspector_path)/build/xxd.py',
3031
'InjectedScriptSource_js',
31-
'injected-script-source.js',
32+
'<(inspector_path)/injected-script-source.js',
3233
'<@(_outputs)'
3334
],
3435
},
@@ -43,7 +44,7 @@
4344
{
4445
'action_name': 'protocol_compatibility',
4546
'inputs': [
46-
'js_protocol.json',
47+
'<(inspector_path)/js_protocol.json',
4748
],
4849
'outputs': [
4950
'<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
@@ -52,7 +53,7 @@
5253
'python',
5354
'<(protocol_path)/CheckProtocolCompatibility.py',
5455
'--stamp', '<@(_outputs)',
55-
'js_protocol.json',
56+
'<(inspector_path)/js_protocol.json',
5657
],
5758
'message': 'Generating inspector protocol sources from protocol json definition',
5859
},
@@ -66,8 +67,8 @@
6667
{
6768
'action_name': 'protocol_generated_sources',
6869
'inputs': [
69-
'js_protocol.json',
70-
'inspector_protocol_config.json',
70+
'<(inspector_path)/js_protocol.json',
71+
'<(inspector_path)/inspector_protocol_config.json',
7172
'<@(inspector_protocol_files)',
7273
],
7374
'outputs': [
@@ -76,9 +77,9 @@
7677
'action': [
7778
'python',
7879
'<(protocol_path)/CodeGenerator.py',
79-
'--jinja_dir', '../../third_party',
80+
'--jinja_dir', '../third_party',
8081
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
81-
'--config', 'inspector_protocol_config.json',
82+
'--config', '<(inspector_path)/inspector_protocol_config.json',
8283
],
8384
'message': 'Generating inspector protocol sources from protocol json',
8485
},

gypfiles/inspector.gypi

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright 2016 the V8 project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
{
6+
'variables': {
7+
'inspector_generated_sources': [
8+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h',
9+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp',
10+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.h',
11+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.cpp',
12+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.h',
13+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.cpp',
14+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.h',
15+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.cpp',
16+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.h',
17+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.cpp',
18+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.h',
19+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.cpp',
20+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.h',
21+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.cpp',
22+
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.h',
23+
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Debugger.h',
24+
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Runtime.h',
25+
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Schema.h',
26+
],
27+
28+
'inspector_injected_script_source': '../src/inspector/injected-script-source.js',
29+
'inspector_generated_injected_script': '<(SHARED_INTERMEDIATE_DIR)/src/inspector/injected-script-source.h',
30+
31+
'inspector_all_sources': [
32+
'<@(inspector_generated_sources)',
33+
'<(inspector_generated_injected_script)',
34+
'../include/v8-inspector.h',
35+
'../include/v8-inspector-protocol.h',
36+
'../src/inspector/injected-script.cc',
37+
'../src/inspector/injected-script.h',
38+
'../src/inspector/inspected-context.cc',
39+
'../src/inspector/inspected-context.h',
40+
'../src/inspector/remote-object-id.cc',
41+
'../src/inspector/remote-object-id.h',
42+
'../src/inspector/search-util.cc',
43+
'../src/inspector/search-util.h',
44+
'../src/inspector/string-16.cc',
45+
'../src/inspector/string-16.h',
46+
'../src/inspector/string-util.cc',
47+
'../src/inspector/string-util.h',
48+
'../src/inspector/test-interface.cc',
49+
'../src/inspector/test-interface.h',
50+
'../src/inspector/v8-console.cc',
51+
'../src/inspector/v8-console.h',
52+
'../src/inspector/v8-console-agent-impl.cc',
53+
'../src/inspector/v8-console-agent-impl.h',
54+
'../src/inspector/v8-console-message.cc',
55+
'../src/inspector/v8-console-message.h',
56+
'../src/inspector/v8-debugger.cc',
57+
'../src/inspector/v8-debugger.h',
58+
'../src/inspector/v8-debugger-agent-impl.cc',
59+
'../src/inspector/v8-debugger-agent-impl.h',
60+
'../src/inspector/v8-debugger-script.cc',
61+
'../src/inspector/v8-debugger-script.h',
62+
'../src/inspector/v8-function-call.cc',
63+
'../src/inspector/v8-function-call.h',
64+
'../src/inspector/v8-heap-profiler-agent-impl.cc',
65+
'../src/inspector/v8-heap-profiler-agent-impl.h',
66+
'../src/inspector/v8-injected-script-host.cc',
67+
'../src/inspector/v8-injected-script-host.h',
68+
'../src/inspector/v8-inspector-impl.cc',
69+
'../src/inspector/v8-inspector-impl.h',
70+
'../src/inspector/v8-inspector-session-impl.cc',
71+
'../src/inspector/v8-inspector-session-impl.h',
72+
'../src/inspector/v8-internal-value-type.cc',
73+
'../src/inspector/v8-internal-value-type.h',
74+
'../src/inspector/v8-profiler-agent-impl.cc',
75+
'../src/inspector/v8-profiler-agent-impl.h',
76+
'../src/inspector/v8-regex.cc',
77+
'../src/inspector/v8-regex.h',
78+
'../src/inspector/v8-runtime-agent-impl.cc',
79+
'../src/inspector/v8-runtime-agent-impl.h',
80+
'../src/inspector/v8-schema-agent-impl.cc',
81+
'../src/inspector/v8-schema-agent-impl.h',
82+
'../src/inspector/v8-stack-trace-impl.cc',
83+
'../src/inspector/v8-stack-trace-impl.h',
84+
'../src/inspector/v8-value-utils.cc',
85+
'../src/inspector/v8-value-utils.h',
86+
'../src/inspector/wasm-translation.cc',
87+
'../src/inspector/wasm-translation.h',
88+
]
89+
}
90+
}

gypfiles/samples.gyp

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright 2012 the V8 project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
{
6+
'variables': {
7+
'v8_code': 1,
8+
'v8_enable_i18n_support%': 1,
9+
'v8_toolset_for_shell%': 'target',
10+
},
11+
'includes': ['toolchain.gypi', 'features.gypi'],
12+
'target_defaults': {
13+
'type': 'executable',
14+
'dependencies': [
15+
'v8.gyp:v8',
16+
'v8.gyp:v8_libbase',
17+
'v8.gyp:v8_libplatform',
18+
],
19+
'include_dirs': [
20+
'..',
21+
],
22+
'conditions': [
23+
['v8_enable_i18n_support==1', {
24+
'dependencies': [
25+
'<(icu_gyp_path):icui18n',
26+
'<(icu_gyp_path):icuuc',
27+
],
28+
}],
29+
['OS=="win" and v8_enable_i18n_support==1', {
30+
'dependencies': [
31+
'<(icu_gyp_path):icudata',
32+
],
33+
}],
34+
],
35+
},
36+
'targets': [
37+
{
38+
'target_name': 'v8_shell',
39+
'sources': [
40+
'../samples/shell.cc',
41+
],
42+
'conditions': [
43+
[ 'want_separate_host_toolset==1', {
44+
'toolsets': [ '<(v8_toolset_for_shell)', ],
45+
}],
46+
],
47+
},
48+
{
49+
'target_name': 'hello-world',
50+
'sources': [
51+
'../samples/hello-world.cc',
52+
],
53+
},
54+
{
55+
'target_name': 'process',
56+
'sources': [
57+
'../samples/process.cc',
58+
],
59+
},
60+
],
61+
}

0 commit comments

Comments
 (0)