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
parent 3d8b844112
commit 3b5773fee3
31 changed files with 67 additions and 96 deletions

3
.flake8 Normal file
View 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
View File

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

View File

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

View File

@ -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)',
}, { }, {

View File

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

View File

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

View File

@ -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': [
[ 'build_v8_with_gn=="true"', {
'dependencies': ['deps/v8/gypfiles/v8-monolithic.gyp:v8_monolith'],
}, {
'dependencies': [ 'dependencies': [
'deps/v8/gypfiles/v8.gyp:v8', 'tools/v8_gypfiles/v8.gyp:v8',
'deps/v8/gypfiles/v8.gyp:v8_libplatform', 'tools/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"', {

View File

@ -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'))

View File

@ -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,9 +86,6 @@
'<(V8_ROOT)/src/inspector/wasm-translation.h', '<(V8_ROOT)/src/inspector/wasm-translation.h',
] ]
}, },
'includes': [
'<(V8_ROOT)/third_party/inspector_protocol/inspector_protocol.gypi',
],
'include_dirs': [ 'include_dirs': [
'<(inspector_generated_output_root)', '<(inspector_generated_output_root)',
], ],

View File

@ -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)',