build,deps: move gypfiles out 2/2 - moving
* move all used files to `tools/v8_gypfiles` directory * fix references in node configuration PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
3d8b844112
commit
3b5773fee3
3
.flake8
Normal file
3
.flake8
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[flake8]
|
||||||
|
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
|
||||||
|
select=E901,E999,F821,F822,F823
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,6 +8,7 @@
|
|||||||
!.editorconfig
|
!.editorconfig
|
||||||
!.eslintignore
|
!.eslintignore
|
||||||
!.eslintrc.js
|
!.eslintrc.js
|
||||||
|
!.flake8
|
||||||
!.gitattributes
|
!.gitattributes
|
||||||
!.github
|
!.github
|
||||||
!.gitignore
|
!.gitignore
|
||||||
@ -123,8 +124,6 @@ deps/uv/docs/src/guide/
|
|||||||
# do not override V8's .gitignore
|
# do not override V8's .gitignore
|
||||||
!deps/v8/**
|
!deps/v8/**
|
||||||
# ignore VS compiler output unhandled by V8's .gitignore
|
# ignore VS compiler output unhandled by V8's .gitignore
|
||||||
deps/v8/gypfiles/Debug/
|
|
||||||
deps/v8/gypfiles/Release/
|
|
||||||
deps/v8/third_party/eu-strip/
|
deps/v8/third_party/eu-strip/
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
12
Makefile
12
Makefile
@ -123,10 +123,10 @@ with-code-cache:
|
|||||||
test-code-cache: with-code-cache
|
test-code-cache: with-code-cache
|
||||||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) code-cache
|
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) code-cache
|
||||||
|
|
||||||
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
|
out/Makefile: config.gypi common.gypi node.gyp \
|
||||||
deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
|
deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
|
||||||
deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \
|
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
|
||||||
config.gypi
|
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
|
||||||
$(PYTHON) tools/gyp_node.py -f make
|
$(PYTHON) tools/gyp_node.py -f make
|
||||||
|
|
||||||
config.gypi: configure configure.py
|
config.gypi: configure configure.py
|
||||||
@ -1305,9 +1305,7 @@ ifneq ("","$(wildcard tools/pip/site-packages)")
|
|||||||
# Lints the Python code with flake8.
|
# Lints the Python code with flake8.
|
||||||
# Flag the build if there are Python syntax errors or undefined names
|
# Flag the build if there are Python syntax errors or undefined names
|
||||||
lint-py:
|
lint-py:
|
||||||
PYTHONPATH=tools/pip $(PYTHON) -m flake8 . \
|
PYTHONPATH=tools/pip $(PYTHON) -m flake8 --count --show-source --statistics .
|
||||||
--count --show-source --statistics --select=E901,E999,F821,F822,F823 \
|
|
||||||
--exclude=.git,deps,lib,src,test/fixtures,tools/*_macros.py,tools/gyp,tools/inspector_protocol,tools/jinja2,tools/markupsafe,tools/pip
|
|
||||||
else
|
else
|
||||||
lint-py:
|
lint-py:
|
||||||
@echo "Python linting with flake8 is not avalible"
|
@echo "Python linting with flake8 is not avalible"
|
||||||
|
19
common.gypi
19
common.gypi
@ -80,16 +80,10 @@
|
|||||||
}],
|
}],
|
||||||
['GENERATOR=="ninja"', {
|
['GENERATOR=="ninja"', {
|
||||||
'obj_dir': '<(PRODUCT_DIR)/obj',
|
'obj_dir': '<(PRODUCT_DIR)/obj',
|
||||||
'conditions': [
|
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_base.a',
|
||||||
[ 'build_v8_with_gn=="true"', {
|
|
||||||
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
|
|
||||||
}, {
|
|
||||||
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/libv8_base.a',
|
|
||||||
}],
|
|
||||||
]
|
|
||||||
}, {
|
}, {
|
||||||
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
|
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
|
||||||
'v8_base': '<(PRODUCT_DIR)/obj.target/deps/v8/gypfiles/libv8_base.a',
|
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_base.a',
|
||||||
}],
|
}],
|
||||||
['OS == "win"', {
|
['OS == "win"', {
|
||||||
'os_posix': 0,
|
'os_posix': 0,
|
||||||
@ -104,15 +98,6 @@
|
|||||||
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
|
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
|
||||||
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
|
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
|
||||||
}],
|
}],
|
||||||
['build_v8_with_gn == "true"', {
|
|
||||||
'conditions': [
|
|
||||||
['GENERATOR == "ninja"', {
|
|
||||||
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
|
|
||||||
}, {
|
|
||||||
'v8_base': '<(PRODUCT_DIR)/obj.target/v8_monolith/geni/gn/obj/libv8_monolith.a',
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
['openssl_fips != ""', {
|
['openssl_fips != ""', {
|
||||||
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
|
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
|
||||||
}, {
|
}, {
|
||||||
|
1
deps/v8/gypfiles/OWNERS
vendored
1
deps/v8/gypfiles/OWNERS
vendored
@ -1 +0,0 @@
|
|||||||
machenbach@chromium.org
|
|
9
deps/v8/gypfiles/README.txt
vendored
9
deps/v8/gypfiles/README.txt
vendored
@ -1,9 +0,0 @@
|
|||||||
For build instructions, please refer to:
|
|
||||||
|
|
||||||
https://code.google.com/p/v8/wiki/BuildingWithGYP
|
|
||||||
|
|
||||||
TL;DR version on *nix:
|
|
||||||
$ make dependencies # Only needed once.
|
|
||||||
$ make ia32.release -j8
|
|
||||||
$ make ia32.release.check # Optionally: run tests.
|
|
||||||
|
|
14
node.gypi
14
node.gypi
@ -85,15 +85,9 @@
|
|||||||
'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ],
|
'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ],
|
||||||
}],
|
}],
|
||||||
[ 'node_use_bundled_v8=="true"', {
|
[ 'node_use_bundled_v8=="true"', {
|
||||||
'conditions': [
|
'dependencies': [
|
||||||
[ 'build_v8_with_gn=="true"', {
|
'tools/v8_gypfiles/v8.gyp:v8',
|
||||||
'dependencies': ['deps/v8/gypfiles/v8-monolithic.gyp:v8_monolith'],
|
'tools/v8_gypfiles/v8.gyp:v8_libplatform',
|
||||||
}, {
|
|
||||||
'dependencies': [
|
|
||||||
'deps/v8/gypfiles/v8.gyp:v8',
|
|
||||||
'deps/v8/gypfiles/v8.gyp:v8_libplatform',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'node_use_v8_platform=="true"', {
|
[ 'node_use_v8_platform=="true"', {
|
||||||
@ -132,7 +126,7 @@
|
|||||||
target_arch=="ia32" or target_arch=="x32")', {
|
target_arch=="ia32" or target_arch=="x32")', {
|
||||||
'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ],
|
'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ],
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'deps/v8/gypfiles/v8vtune.gyp:v8_vtune'
|
'tools/v8_gypfiles/v8vtune.gyp:v8_vtune'
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'node_no_browser_globals=="true"', {
|
[ 'node_no_browser_globals=="true"', {
|
||||||
|
@ -32,14 +32,15 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
import gyp_environment
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
sys.path.insert(0, script_dir)
|
||||||
|
import gyp_environment
|
||||||
|
|
||||||
v8_root = os.path.abspath(os.path.join(script_dir, os.pardir))
|
v8_root = os.path.abspath(os.path.join(script_dir, os.pardir))
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib'))
|
sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib'))
|
@ -3,6 +3,9 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
{
|
{
|
||||||
|
'includes': [
|
||||||
|
'../../deps/v8/third_party/inspector_protocol/inspector_protocol.gypi',
|
||||||
|
],
|
||||||
'variables': {
|
'variables': {
|
||||||
'inspector_protocol_path': '<(V8_ROOT)/third_party/inspector_protocol',
|
'inspector_protocol_path': '<(V8_ROOT)/third_party/inspector_protocol',
|
||||||
'inspector_path': '<(V8_ROOT)/src/inspector',
|
'inspector_path': '<(V8_ROOT)/src/inspector',
|
||||||
@ -83,48 +86,45 @@
|
|||||||
'<(V8_ROOT)/src/inspector/wasm-translation.h',
|
'<(V8_ROOT)/src/inspector/wasm-translation.h',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'includes': [
|
'include_dirs': [
|
||||||
'<(V8_ROOT)/third_party/inspector_protocol/inspector_protocol.gypi',
|
'<(inspector_generated_output_root)',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'actions': [
|
||||||
'<(inspector_generated_output_root)',
|
{
|
||||||
],
|
'action_name': 'protocol_compatibility',
|
||||||
'actions': [
|
'inputs': [
|
||||||
{
|
'<(inspector_path)/js_protocol.pdl',
|
||||||
'action_name': 'protocol_compatibility',
|
],
|
||||||
'inputs': [
|
'outputs': [
|
||||||
'<(inspector_path)/js_protocol.pdl',
|
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
|
||||||
],
|
],
|
||||||
'outputs': [
|
'action': [
|
||||||
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
|
'python',
|
||||||
],
|
'<(inspector_protocol_path)/check_protocol_compatibility.py',
|
||||||
'action': [
|
'--stamp', '<@(_outputs)',
|
||||||
'python',
|
'<@(_inputs)',
|
||||||
'<(inspector_protocol_path)/check_protocol_compatibility.py',
|
],
|
||||||
'--stamp', '<@(_outputs)',
|
'message': 'Checking inspector protocol compatibility',
|
||||||
'<@(_inputs)',
|
},
|
||||||
],
|
{
|
||||||
'message': 'Checking inspector protocol compatibility',
|
'action_name': 'protocol_generated_sources',
|
||||||
},
|
'inputs': [
|
||||||
{
|
'<(inspector_path)/js_protocol.pdl',
|
||||||
'action_name': 'protocol_generated_sources',
|
'<(inspector_path)/inspector_protocol_config.json',
|
||||||
'inputs': [
|
'<@(inspector_protocol_files)',
|
||||||
'<(inspector_path)/js_protocol.pdl',
|
],
|
||||||
'<(inspector_path)/inspector_protocol_config.json',
|
'outputs': [
|
||||||
'<@(inspector_protocol_files)',
|
'<@(inspector_generated_sources)',
|
||||||
],
|
],
|
||||||
'outputs': [
|
'process_outputs_as_sources': 1,
|
||||||
'<@(inspector_generated_sources)',
|
'action': [
|
||||||
],
|
'python',
|
||||||
'process_outputs_as_sources': 1,
|
'<(inspector_protocol_path)/code_generator.py',
|
||||||
'action': [
|
'--jinja_dir', '<(V8_ROOT)/third_party',
|
||||||
'python',
|
'--output_base', '<(inspector_generated_output_root)/src/inspector',
|
||||||
'<(inspector_protocol_path)/code_generator.py',
|
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
||||||
'--jinja_dir', '<(V8_ROOT)/third_party',
|
],
|
||||||
'--output_base', '<(inspector_generated_output_root)/src/inspector',
|
'message': 'Generating inspector protocol sources from protocol json',
|
||||||
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
},
|
||||||
],
|
],
|
||||||
'message': 'Generating inspector protocol sources from protocol json',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
}
|
@ -3,6 +3,7 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
{
|
{
|
||||||
'variables': {
|
'variables': {
|
||||||
|
'V8_ROOT': '../../deps/v8',
|
||||||
'v8_code': 1,
|
'v8_code': 1,
|
||||||
'v8_random_seed%': 314159265,
|
'v8_random_seed%': 314159265,
|
||||||
'v8_vector_stores%': 0,
|
'v8_vector_stores%': 0,
|
||||||
@ -397,8 +398,8 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.h',
|
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
|
||||||
'msvs_precompiled_source': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.cc',
|
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
|
||||||
'sources': [
|
'sources': [
|
||||||
'<(_msvs_precompiled_header)',
|
'<(_msvs_precompiled_header)',
|
||||||
'<(_msvs_precompiled_source)',
|
'<(_msvs_precompiled_source)',
|
||||||
@ -2025,8 +2026,8 @@
|
|||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.h',
|
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
|
||||||
'msvs_precompiled_source': '<(V8_ROOT)/<(V8_ROOT)/<(V8_ROOT)/tools/msvs/pch/v8_pch.cc',
|
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
|
||||||
'sources': [
|
'sources': [
|
||||||
'<(_msvs_precompiled_header)',
|
'<(_msvs_precompiled_header)',
|
||||||
'<(_msvs_precompiled_source)',
|
'<(_msvs_precompiled_source)',
|
Loading…
x
Reference in New Issue
Block a user