Skip to content

Commit

Permalink
build,deps: move gypfiles out 2/2 - moving
Browse files Browse the repository at this point in the history
* move all used files to `tools/v8_gypfiles` directory
* fix references in node configuration

PR-URL: #26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
refack committed Mar 28, 2019
1 parent 3d8b844 commit 3b5773f
Show file tree
Hide file tree
Showing 31 changed files with 67 additions and 96 deletions.
3 changes: 3 additions & 0 deletions .flake8
@@ -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 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@
!.editorconfig
!.eslintignore
!.eslintrc.js
!.flake8
!.gitattributes
!.github
!.gitignore
Expand Down Expand Up @@ -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
12 changes: 5 additions & 7 deletions Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
19 changes: 2 additions & 17 deletions common.gypi
Expand Up @@ -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,
Expand All @@ -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)',
}, {
Expand Down
1 change: 0 additions & 1 deletion deps/v8/gypfiles/OWNERS

This file was deleted.

9 changes: 0 additions & 9 deletions deps/v8/gypfiles/README.txt

This file was deleted.

14 changes: 4 additions & 10 deletions node.gypi
Expand Up @@ -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"', {
Expand Down Expand Up @@ -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"', {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions deps/v8/gypfiles/gyp_v8 → tools/v8_gypfiles/broken/gyp_v8
Expand Up @@ -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'))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
},
],
}
File renamed without changes.
9 changes: 5 additions & 4 deletions deps/v8/gypfiles/v8.gyp → tools/v8_gypfiles/v8.gyp
Expand Up @@ -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,
Expand Down Expand Up @@ -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)',
Expand Down Expand Up @@ -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)',
Expand Down
File renamed without changes.

0 comments on commit 3b5773f

Please sign in to comment.