Skip to content

Commit 3b5773f

Browse files
committed
build,deps: move gypfiles out 2/2 - moving
* move all used files to `tools/v8_gypfiles` directory * fix references in node configuration PR-URL: #26685 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 3d8b844 commit 3b5773f

31 files changed

+67
-96
lines changed

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
exclude=.git,deps,lib,src,test/fixtures,tools/*_macros.py,tools/gyp,tools/inspector_protocol,tools/jinja2,tools/markupsafe,tools/pip,tools/v8_gypfiles/broken
3+
select=E901,E999,F821,F822,F823

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
!.editorconfig
99
!.eslintignore
1010
!.eslintrc.js
11+
!.flake8
1112
!.gitattributes
1213
!.github
1314
!.gitignore
@@ -123,8 +124,6 @@ deps/uv/docs/src/guide/
123124
# do not override V8's .gitignore
124125
!deps/v8/**
125126
# ignore VS compiler output unhandled by V8's .gitignore
126-
deps/v8/gypfiles/Debug/
127-
deps/v8/gypfiles/Release/
128127
deps/v8/third_party/eu-strip/
129128

130129
.DS_Store

Makefile

+5-7
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ with-code-cache:
123123
test-code-cache: with-code-cache
124124
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) code-cache
125125

126-
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
127-
deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
128-
deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \
129-
config.gypi
126+
out/Makefile: config.gypi common.gypi node.gyp \
127+
deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
128+
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
129+
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
130130
$(PYTHON) tools/gyp_node.py -f make
131131

132132
config.gypi: configure configure.py
@@ -1305,9 +1305,7 @@ ifneq ("","$(wildcard tools/pip/site-packages)")
13051305
# Lints the Python code with flake8.
13061306
# Flag the build if there are Python syntax errors or undefined names
13071307
lint-py:
1308-
PYTHONPATH=tools/pip $(PYTHON) -m flake8 . \
1309-
--count --show-source --statistics --select=E901,E999,F821,F822,F823 \
1310-
--exclude=.git,deps,lib,src,test/fixtures,tools/*_macros.py,tools/gyp,tools/inspector_protocol,tools/jinja2,tools/markupsafe,tools/pip
1308+
PYTHONPATH=tools/pip $(PYTHON) -m flake8 --count --show-source --statistics .
13111309
else
13121310
lint-py:
13131311
@echo "Python linting with flake8 is not avalible"

common.gypi

+2-17
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,10 @@
8080
}],
8181
['GENERATOR=="ninja"', {
8282
'obj_dir': '<(PRODUCT_DIR)/obj',
83-
'conditions': [
84-
[ 'build_v8_with_gn=="true"', {
85-
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
86-
}, {
87-
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/libv8_base.a',
88-
}],
89-
]
83+
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_base.a',
9084
}, {
9185
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
92-
'v8_base': '<(PRODUCT_DIR)/obj.target/deps/v8/gypfiles/libv8_base.a',
86+
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_base.a',
9387
}],
9488
['OS == "win"', {
9589
'os_posix': 0,
@@ -104,15 +98,6 @@
10498
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
10599
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
106100
}],
107-
['build_v8_with_gn == "true"', {
108-
'conditions': [
109-
['GENERATOR == "ninja"', {
110-
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
111-
}, {
112-
'v8_base': '<(PRODUCT_DIR)/obj.target/v8_monolith/geni/gn/obj/libv8_monolith.a',
113-
}],
114-
],
115-
}],
116101
['openssl_fips != ""', {
117102
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
118103
}, {

deps/v8/gypfiles/OWNERS

-1
This file was deleted.

deps/v8/gypfiles/README.txt

-9
This file was deleted.

node.gypi

+4-10
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,9 @@
8585
'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ],
8686
}],
8787
[ 'node_use_bundled_v8=="true"', {
88-
'conditions': [
89-
[ 'build_v8_with_gn=="true"', {
90-
'dependencies': ['deps/v8/gypfiles/v8-monolithic.gyp:v8_monolith'],
91-
}, {
92-
'dependencies': [
93-
'deps/v8/gypfiles/v8.gyp:v8',
94-
'deps/v8/gypfiles/v8.gyp:v8_libplatform',
95-
],
96-
}],
88+
'dependencies': [
89+
'tools/v8_gypfiles/v8.gyp:v8',
90+
'tools/v8_gypfiles/v8.gyp:v8_libplatform',
9791
],
9892
}],
9993
[ 'node_use_v8_platform=="true"', {
@@ -132,7 +126,7 @@
132126
target_arch=="ia32" or target_arch=="x32")', {
133127
'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ],
134128
'dependencies': [
135-
'deps/v8/gypfiles/v8vtune.gyp:v8_vtune'
129+
'tools/v8_gypfiles/v8vtune.gyp:v8_vtune'
136130
],
137131
}],
138132
[ 'node_no_browser_globals=="true"', {
File renamed without changes.

deps/v8/gypfiles/gyp_v8 renamed to tools/v8_gypfiles/broken/gyp_v8

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@
3232

3333
import argparse
3434
import glob
35-
import gyp_environment
3635
import os
3736
import platform
3837
import shlex
39-
import subprocess
4038
import sys
4139

4240
script_dir = os.path.dirname(os.path.realpath(__file__))
41+
sys.path.insert(0, script_dir)
42+
import gyp_environment
43+
4344
v8_root = os.path.abspath(os.path.join(script_dir, os.pardir))
4445

4546
sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib'))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

deps/v8/gypfiles/inspector.gypi renamed to tools/v8_gypfiles/inspector.gypi

+44-44
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# found in the LICENSE file.
44

55
{
6+
'includes': [
7+
'../../deps/v8/third_party/inspector_protocol/inspector_protocol.gypi',
8+
],
69
'variables': {
710
'inspector_protocol_path': '<(V8_ROOT)/third_party/inspector_protocol',
811
'inspector_path': '<(V8_ROOT)/src/inspector',
@@ -83,48 +86,45 @@
8386
'<(V8_ROOT)/src/inspector/wasm-translation.h',
8487
]
8588
},
86-
'includes': [
87-
'<(V8_ROOT)/third_party/inspector_protocol/inspector_protocol.gypi',
88-
],
89-
'include_dirs': [
90-
'<(inspector_generated_output_root)',
91-
],
92-
'actions': [
93-
{
94-
'action_name': 'protocol_compatibility',
95-
'inputs': [
96-
'<(inspector_path)/js_protocol.pdl',
97-
],
98-
'outputs': [
99-
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
100-
],
101-
'action': [
102-
'python',
103-
'<(inspector_protocol_path)/check_protocol_compatibility.py',
104-
'--stamp', '<@(_outputs)',
105-
'<@(_inputs)',
106-
],
107-
'message': 'Checking inspector protocol compatibility',
108-
},
109-
{
110-
'action_name': 'protocol_generated_sources',
111-
'inputs': [
112-
'<(inspector_path)/js_protocol.pdl',
113-
'<(inspector_path)/inspector_protocol_config.json',
114-
'<@(inspector_protocol_files)',
115-
],
116-
'outputs': [
117-
'<@(inspector_generated_sources)',
118-
],
119-
'process_outputs_as_sources': 1,
120-
'action': [
121-
'python',
122-
'<(inspector_protocol_path)/code_generator.py',
123-
'--jinja_dir', '<(V8_ROOT)/third_party',
124-
'--output_base', '<(inspector_generated_output_root)/src/inspector',
125-
'--config', '<(inspector_path)/inspector_protocol_config.json',
126-
],
127-
'message': 'Generating inspector protocol sources from protocol json',
128-
},
129-
],
89+
'include_dirs': [
90+
'<(inspector_generated_output_root)',
91+
],
92+
'actions': [
93+
{
94+
'action_name': 'protocol_compatibility',
95+
'inputs': [
96+
'<(inspector_path)/js_protocol.pdl',
97+
],
98+
'outputs': [
99+
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
100+
],
101+
'action': [
102+
'python',
103+
'<(inspector_protocol_path)/check_protocol_compatibility.py',
104+
'--stamp', '<@(_outputs)',
105+
'<@(_inputs)',
106+
],
107+
'message': 'Checking inspector protocol compatibility',
108+
},
109+
{
110+
'action_name': 'protocol_generated_sources',
111+
'inputs': [
112+
'<(inspector_path)/js_protocol.pdl',
113+
'<(inspector_path)/inspector_protocol_config.json',
114+
'<@(inspector_protocol_files)',
115+
],
116+
'outputs': [
117+
'<@(inspector_generated_sources)',
118+
],
119+
'process_outputs_as_sources': 1,
120+
'action': [
121+
'python',
122+
'<(inspector_protocol_path)/code_generator.py',
123+
'--jinja_dir', '<(V8_ROOT)/third_party',
124+
'--output_base', '<(inspector_generated_output_root)/src/inspector',
125+
'--config', '<(inspector_path)/inspector_protocol_config.json',
126+
],
127+
'message': 'Generating inspector protocol sources from protocol json',
128+
},
129+
],
130130
}
File renamed without changes.

deps/v8/gypfiles/v8.gyp renamed to tools/v8_gypfiles/v8.gyp

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# found in the LICENSE file.
44
{
55
'variables': {
6+
'V8_ROOT': '../../deps/v8',
67
'v8_code': 1,
78
'v8_random_seed%': 314159265,
89
'v8_vector_stores%': 0,
@@ -397,8 +398,8 @@
397398
},
398399
],
399400
['OS=="win"', {
400-
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.h',
401-
'msvs_precompiled_source': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.cc',
401+
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
402+
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
402403
'sources': [
403404
'<(_msvs_precompiled_header)',
404405
'<(_msvs_precompiled_source)',
@@ -2025,8 +2026,8 @@
20252026
],
20262027
}],
20272028
['OS=="win"', {
2028-
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.h',
2029-
'msvs_precompiled_source': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.cc',
2029+
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
2030+
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
20302031
'sources': [
20312032
'<(_msvs_precompiled_header)',
20322033
'<(_msvs_precompiled_source)',

0 commit comments

Comments
 (0)