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:
Refael Ackermann 2019-03-24 22:58:29 -04:00 коммит произвёл Beth Griggs
Родитель 89ca131994
Коммит 896ae3ea22
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: D7062848A1AB005C
31 изменённых файлов: 67 добавлений и 96 удалений

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 поставляемый
Просмотреть файл

@ -8,6 +8,7 @@
!.editorconfig
!.eslintignore
!.eslintrc.js
!.flake8
!.gitattributes
!.github
!.gitignore
@ -123,8 +124,6 @@ deps/uv/docs/src/guide/
# do not override V8's .gitignore
!deps/v8/**
# ignore VS compiler output unhandled by V8's .gitignore
deps/v8/gypfiles/Debug/
deps/v8/gypfiles/Release/
deps/v8/third_party/eu-strip/
.DS_Store

Просмотреть файл

@ -123,10 +123,10 @@ with-code-cache:
test-code-cache: with-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 \
deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \
config.gypi
out/Makefile: config.gypi common.gypi node.gyp \
deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make
config.gypi: configure configure.py
@ -1305,9 +1305,7 @@ ifneq ("","$(wildcard tools/pip/site-packages)")
# Lints the Python code with flake8.
# Flag the build if there are Python syntax errors or undefined names
lint-py:
PYTHONPATH=tools/pip $(PYTHON) -m flake8 . \
--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
PYTHONPATH=tools/pip $(PYTHON) -m flake8 --count --show-source --statistics .
else
lint-py:
@echo "Python linting with flake8 is not avalible"

Просмотреть файл

@ -80,16 +80,10 @@
}],
['GENERATOR=="ninja"', {
'obj_dir': '<(PRODUCT_DIR)/obj',
'conditions': [
[ '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',
}],
]
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_base.a',
}, {
'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_posix': 0,
@ -104,15 +98,6 @@
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'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_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
}, {

1
deps/v8/gypfiles/OWNERS поставляемый
Просмотреть файл

@ -1 +0,0 @@
machenbach@chromium.org

9
deps/v8/gypfiles/README.txt поставляемый
Просмотреть файл

@ -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.

Просмотреть файл

@ -85,15 +85,9 @@
'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ],
}],
[ 'node_use_bundled_v8=="true"', {
'conditions': [
[ 'build_v8_with_gn=="true"', {
'dependencies': ['deps/v8/gypfiles/v8-monolithic.gyp:v8_monolith'],
}, {
'dependencies': [
'deps/v8/gypfiles/v8.gyp:v8',
'deps/v8/gypfiles/v8.gyp:v8_libplatform',
],
}],
'dependencies': [
'tools/v8_gypfiles/v8.gyp:v8',
'tools/v8_gypfiles/v8.gyp:v8_libplatform',
],
}],
[ 'node_use_v8_platform=="true"', {
@ -132,7 +126,7 @@
target_arch=="ia32" or target_arch=="x32")', {
'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ],
'dependencies': [
'deps/v8/gypfiles/v8vtune.gyp:v8_vtune'
'tools/v8_gypfiles/v8vtune.gyp:v8_vtune'
],
}],
[ 'node_no_browser_globals=="true"', {

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -32,14 +32,15 @@
import argparse
import glob
import gyp_environment
import os
import platform
import shlex
import subprocess
import sys
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))
sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib'))

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -3,6 +3,9 @@
# found in the LICENSE file.
{
'includes': [
'../../deps/v8/third_party/inspector_protocol/inspector_protocol.gypi',
],
'variables': {
'inspector_protocol_path': '<(V8_ROOT)/third_party/inspector_protocol',
'inspector_path': '<(V8_ROOT)/src/inspector',
@ -83,48 +86,45 @@
'<(V8_ROOT)/src/inspector/wasm-translation.h',
]
},
'includes': [
'<(V8_ROOT)/third_party/inspector_protocol/inspector_protocol.gypi',
],
'include_dirs': [
'<(inspector_generated_output_root)',
],
'actions': [
{
'action_name': 'protocol_compatibility',
'inputs': [
'<(inspector_path)/js_protocol.pdl',
],
'outputs': [
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
],
'action': [
'python',
'<(inspector_protocol_path)/check_protocol_compatibility.py',
'--stamp', '<@(_outputs)',
'<@(_inputs)',
],
'message': 'Checking inspector protocol compatibility',
},
{
'action_name': 'protocol_generated_sources',
'inputs': [
'<(inspector_path)/js_protocol.pdl',
'<(inspector_path)/inspector_protocol_config.json',
'<@(inspector_protocol_files)',
],
'outputs': [
'<@(inspector_generated_sources)',
],
'process_outputs_as_sources': 1,
'action': [
'python',
'<(inspector_protocol_path)/code_generator.py',
'--jinja_dir', '<(V8_ROOT)/third_party',
'--output_base', '<(inspector_generated_output_root)/src/inspector',
'--config', '<(inspector_path)/inspector_protocol_config.json',
],
'message': 'Generating inspector protocol sources from protocol json',
},
],
'include_dirs': [
'<(inspector_generated_output_root)',
],
'actions': [
{
'action_name': 'protocol_compatibility',
'inputs': [
'<(inspector_path)/js_protocol.pdl',
],
'outputs': [
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
],
'action': [
'python',
'<(inspector_protocol_path)/check_protocol_compatibility.py',
'--stamp', '<@(_outputs)',
'<@(_inputs)',
],
'message': 'Checking inspector protocol compatibility',
},
{
'action_name': 'protocol_generated_sources',
'inputs': [
'<(inspector_path)/js_protocol.pdl',
'<(inspector_path)/inspector_protocol_config.json',
'<@(inspector_protocol_files)',
],
'outputs': [
'<@(inspector_generated_sources)',
],
'process_outputs_as_sources': 1,
'action': [
'python',
'<(inspector_protocol_path)/code_generator.py',
'--jinja_dir', '<(V8_ROOT)/third_party',
'--output_base', '<(inspector_generated_output_root)/src/inspector',
'--config', '<(inspector_path)/inspector_protocol_config.json',
],
'message': 'Generating inspector protocol sources from protocol json',
},
],
}

Просмотреть файл

Просмотреть файл

@ -3,6 +3,7 @@
# found in the LICENSE file.
{
'variables': {
'V8_ROOT': '../../deps/v8',
'v8_code': 1,
'v8_random_seed%': 314159265,
'v8_vector_stores%': 0,
@ -397,8 +398,8 @@
},
],
['OS=="win"', {
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(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_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',
@ -2025,8 +2026,8 @@
],
}],
['OS=="win"', {
'msvs_precompiled_header': '<(V8_ROOT)/<(V8_ROOT)/<(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_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',