From 2c8663aa1a2d7e411bb2759dfe31d289990db135 Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Thu, 8 Feb 2018 20:21:52 +0100 Subject: [PATCH] [gyp] remove gyp files. R=machenbach@chromium.org Bug: v8:7335 Change-Id: Ied1101295fc9ee37fcc038b9aeb557229722df0b Reviewed-on: https://chromium-review.googlesource.com/897566 Commit-Queue: Yang Guo Reviewed-by: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#51185} --- .gitignore | 2 - DEPS | 8 - Makefile | 475 -------- Makefile.android | 72 -- PRESUBMIT.py | 34 - WATCHLISTS | 6 - gypfiles/OWNERS | 1 - gypfiles/README.txt | 9 - gypfiles/all.gyp | 33 - gypfiles/cctest.gyp | 468 -------- gypfiles/coverage_wrapper.py | 38 - gypfiles/d8.gyp | 119 -- gypfiles/features.gypi | 181 ---- gypfiles/fuzzer.gyp | 518 --------- gypfiles/gmock.gyp | 72 -- gypfiles/gtest.gyp | 122 --- gypfiles/gyp_environment.py | 57 - gypfiles/gyp_v8 | 188 ---- gypfiles/gyp_v8.py | 41 - gypfiles/inspector-test.gyp | 39 - gypfiles/inspector.gyp | 89 -- gypfiles/inspector.gypi | 90 -- gypfiles/mac/asan.gyp | 31 - gypfiles/mkgrokdump.gyp | 27 - gypfiles/parser-shell.gyp | 60 -- gypfiles/run-tests-legacy.py | 50 - gypfiles/samples.gyp | 61 -- gypfiles/set_clang_warning_flags.gypi | 59 - gypfiles/shim_headers.gypi | 73 -- gypfiles/standalone.gypi | 1413 ------------------------ gypfiles/sysroot_ld_flags.sh | 12 - gypfiles/toolchain.gypi | 1429 ------------------------- gypfiles/unittests.gyp | 287 ----- gypfiles/v8vtune.gyp | 36 - gypfiles/verify_source_deps.py | 187 ---- tools/gyp_flag_compare.py | 280 ----- tools/mingw-generate-makefiles.sh | 97 -- tools/node/update_node.py | 35 +- tools/presubmit.py | 5 +- 39 files changed, 25 insertions(+), 6779 deletions(-) delete mode 100644 Makefile delete mode 100644 Makefile.android delete mode 100644 gypfiles/OWNERS delete mode 100644 gypfiles/README.txt delete mode 100644 gypfiles/all.gyp delete mode 100644 gypfiles/cctest.gyp delete mode 100755 gypfiles/coverage_wrapper.py delete mode 100644 gypfiles/d8.gyp delete mode 100644 gypfiles/features.gypi delete mode 100644 gypfiles/fuzzer.gyp delete mode 100644 gypfiles/gmock.gyp delete mode 100644 gypfiles/gtest.gyp delete mode 100644 gypfiles/gyp_environment.py delete mode 100755 gypfiles/gyp_v8 delete mode 100644 gypfiles/gyp_v8.py delete mode 100644 gypfiles/inspector-test.gyp delete mode 100644 gypfiles/inspector.gyp delete mode 100644 gypfiles/inspector.gypi delete mode 100644 gypfiles/mac/asan.gyp delete mode 100644 gypfiles/mkgrokdump.gyp delete mode 100644 gypfiles/parser-shell.gyp delete mode 100755 gypfiles/run-tests-legacy.py delete mode 100644 gypfiles/samples.gyp delete mode 100644 gypfiles/set_clang_warning_flags.gypi delete mode 100644 gypfiles/shim_headers.gypi delete mode 100644 gypfiles/standalone.gypi delete mode 100755 gypfiles/sysroot_ld_flags.sh delete mode 100644 gypfiles/toolchain.gypi delete mode 100644 gypfiles/unittests.gyp delete mode 100644 gypfiles/v8vtune.gyp delete mode 100755 gypfiles/verify_source_deps.py delete mode 100755 tools/gyp_flag_compare.py delete mode 100755 tools/mingw-generate-makefiles.sh diff --git a/.gitignore b/.gitignore index 0fb01c42fc..9dc1784187 100644 --- a/.gitignore +++ b/.gitignore @@ -37,8 +37,6 @@ /base /build /buildtools -/gypfiles/.gold_plugin -/gypfiles/win_toolchain.json /hydrogen.cfg /obj /out diff --git a/DEPS b/DEPS index eb410e1105..695705537d 100644 --- a/DEPS +++ b/DEPS @@ -79,7 +79,6 @@ include_rules = [ # checkdeps.py shouldn't check for includes in these directories: skip_child_includes = [ 'build', - 'gypfiles', 'third_party', ] @@ -334,13 +333,6 @@ hooks = [ '-s', 'v8/tools/mips_toolchain.tar.gz.sha1', ], }, - { - # A change to a .gyp, .gypi, or to GYP itself should run the generator. - 'name': 'regyp_if_needed', - 'pattern': '.', - 'condition': 'build_for_node != True', - 'action': ['python', 'v8/gypfiles/gyp_v8', '--running-as-hook'], - }, # Download and initialize "vpython" VirtualEnv environment packages. { 'name': 'vpython_common', diff --git a/Makefile b/Makefile deleted file mode 100644 index a74264cb07..0000000000 --- a/Makefile +++ /dev/null @@ -1,475 +0,0 @@ -# Copyright 2012 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -# Variable default definitions. Override them by exporting them in your shell. -OUTDIR ?= out -TESTJOBS ?= -GYPFLAGS ?= -TESTFLAGS ?= -ANDROID_NDK_HOST_ARCH ?= -ANDROID_V8 ?= /data/local/tmp/v8 - -$(warning Make (gyp) is deprecated. Please use GN instead.) -$(warning See https://github.com/v8/v8/wiki/Building-with-GN) -$(warning Or contact yangguo@chromium.org.) -$(error Expect the Makefile to be removed soon) - -include tools/Makefile.tags - -# Special build flags. Use them like this: "make library=shared" - -# library=shared || component=shared_library -ifeq ($(library), shared) - GYPFLAGS += -Dcomponent=shared_library -endif -ifdef component - GYPFLAGS += -Dcomponent=$(component) -endif -# disassembler=on -ifeq ($(disassembler), on) - GYPFLAGS += -Dv8_enable_disassembler=1 -endif -# objectprint=on -ifeq ($(objectprint), on) - GYPFLAGS += -Dv8_object_print=1 -endif -# verifycsa=on -ifeq ($(verifycsa), on) - GYPFLAGS += -Dv8_enable_verify_csa=1 -endif -# verifyheap=on -ifeq ($(verifyheap), on) - GYPFLAGS += -Dv8_enable_verify_heap=1 -endif -# tracemaps=on -ifeq ($(tracemaps), on) - GYPFLAGS += -Dv8_trace_maps=1 -endif -# concurrentmarking=on -ifeq ($(concurrentmarking), on) - GYPFLAGS += -Dv8_enable_concurrent_marking=1 -endif -# backtrace=off -ifeq ($(backtrace), off) - GYPFLAGS += -Dv8_enable_backtrace=0 -else - GYPFLAGS += -Dv8_enable_backtrace=1 -endif -# verifypredictable=on -ifeq ($(verifypredictable), on) - GYPFLAGS += -Dv8_enable_verify_predictable=1 -endif -# snapshot=off -ifeq ($(snapshot), off) - GYPFLAGS += -Dv8_use_snapshot='false' -endif -ifeq ($(snapshot), external) - GYPFLAGS += -Dv8_use_external_startup_data=1 -endif -# extrachecks=on/off -ifeq ($(extrachecks), on) - GYPFLAGS += -Ddcheck_always_on=1 -Dv8_enable_handle_zapping=1 -endif -ifeq ($(extrachecks), off) - GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0 -endif -# slowdchecks=on/off -ifeq ($(slowdchecks), on) - GYPFLAGS += -Dv8_enable_slow_dchecks=1 -endif -ifeq ($(slowdchecks), off) - GYPFLAGS += -Dv8_enable_slow_dchecks=0 -endif -# debugsymbols=on -ifeq ($(debugsymbols), on) - GYPFLAGS += -Drelease_extra_cflags=-ggdb3 -endif -# gdbjit=on/off -ifeq ($(gdbjit), on) - GYPFLAGS += -Dv8_enable_gdbjit=1 -endif -ifeq ($(gdbjit), off) - GYPFLAGS += -Dv8_enable_gdbjit=0 -endif -# vtunejit=on -ifeq ($(vtunejit), on) - GYPFLAGS += -Dv8_enable_vtunejit=1 -endif -# unalignedaccess=on -ifeq ($(unalignedaccess), on) - GYPFLAGS += -Dv8_can_use_unaligned_accesses=true -endif -# randomseed=12345, disable random seed via randomseed=0 -ifdef randomseed - GYPFLAGS += -Dv8_random_seed=$(randomseed) -endif -# soname_version=1.2.3 -ifdef soname_version - GYPFLAGS += -Dsoname_version=$(soname_version) -endif -# werror=no -ifeq ($(werror), no) - GYPFLAGS += -Dwerror='' -endif -# strictaliasing=off (workaround for GCC-4.5) -ifeq ($(strictaliasing), off) - GYPFLAGS += -Dv8_no_strict_aliasing=1 -endif -# regexp=interpreted -ifeq ($(regexp), interpreted) - GYPFLAGS += -Dv8_interpreted_regexp=1 -endif -# i18nsupport=off -ifeq ($(i18nsupport), off) - GYPFLAGS += -Dv8_enable_i18n_support=0 - TESTFLAGS += --noi18n -endif -# deprecationwarnings=on -ifeq ($(deprecationwarnings), on) - GYPFLAGS += -Dv8_deprecation_warnings=1 -endif -# vectorstores=on -ifeq ($(vectorstores), on) - GYPFLAGS += -Dv8_vector_stores=1 -endif -# imminentdeprecationwarnings=on -ifeq ($(imminentdeprecationwarnings), on) - GYPFLAGS += -Dv8_imminent_deprecation_warnings=1 -endif -# asan=on -ifeq ($(asan), on) - GYPFLAGS += -Dasan=1 -Dclang=1 - TESTFLAGS += --asan - ifeq ($(lsan), on) - GYPFLAGS += -Dlsan=1 - endif -endif -ifdef embedscript - GYPFLAGS += -Dembed_script=$(embedscript) -endif -ifdef warmupscript - GYPFLAGS += -Dwarmup_script=$(warmupscript) -endif -ifeq ($(goma), on) - GYPFLAGS += -Duse_goma=1 -endif -# v8_os_page_size=0, when 0 or not specified use build OS page size -ifdef v8_os_page_size - ifneq ($(v8_os_page_size), 0) - ifneq ($(snapshot), off) - GYPFLAGS += -Dv8_os_page_size=$(v8_os_page_size) - endif - endif -endif -# arm specific flags. -# arm_version= -ifneq ($(strip $(arm_version)),) - GYPFLAGS += -Darm_version=$(arm_version) -else -# Deprecated (use arm_version instead): armv7=false/true -ifeq ($(armv7), false) - GYPFLAGS += -Darm_version=6 -else -ifeq ($(armv7), true) - GYPFLAGS += -Darm_version=7 -endif -endif -endif -# hardfp=on/off. Deprecated, use armfloatabi -ifeq ($(hardfp),on) - GYPFLAGS += -Darm_float_abi=hard -else -ifeq ($(hardfp),off) - GYPFLAGS += -Darm_float_abi=softfp -endif -endif -# fpu: armfpu=xxx -# xxx: vfp, vfpv3-d16, vfpv3, neon. -ifeq ($(armfpu),) - GYPFLAGS += -Darm_fpu=default -else - GYPFLAGS += -Darm_fpu=$(armfpu) -endif -# float abi: armfloatabi=softfp/hard -ifeq ($(armfloatabi),) -ifeq ($(hardfp),) - GYPFLAGS += -Darm_float_abi=default -endif -else - GYPFLAGS += -Darm_float_abi=$(armfloatabi) -endif -# armthumb=on/off -ifeq ($(armthumb), off) - GYPFLAGS += -Darm_thumb=0 -else -ifeq ($(armthumb), on) - GYPFLAGS += -Darm_thumb=1 -endif -endif -# arm_test_noprobe=on -# With this flag set, by default v8 will only use features implied -# by the compiler (no probe). This is done by modifying the default -# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon. -# Modifying these flags when launching v8 will enable the probing for -# the specified values. -ifeq ($(arm_test_noprobe), on) - GYPFLAGS += -Darm_test_noprobe=on -endif -# Do not omit the frame pointer, needed for profiling with perf -ifeq ($(no_omit_framepointer), on) - GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer -endif - -ifdef android_ndk_root - GYPFLAGS += -Dandroid_ndk_root=$(android_ndk_root) - export ANDROID_NDK_ROOT = $(android_ndk_root) -endif - -# ----------------- available targets: -------------------- -# - any arch listed in ARCHES (see below) -# - any mode listed in MODES -# - every combination ., e.g. "ia32.release" -# - "native": current host's architecture, release mode -# - any of the above with .check appended, e.g. "ia32.release.check" -# - "android": cross-compile for Android/ARM -# - default (no target specified): build all DEFAULT_ARCHES and MODES -# - "check": build all targets and run all tests -# - ".clean" for any in ARCHES -# - "clean": clean all ARCHES - -# ----------------- internal stuff ------------------------ - -# Architectures and modes to be compiled. Consider these to be internal -# variables, don't override them (use the targets instead). -ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el ppc ppc64 s390 s390x -ARCHES32 = ia32 arm mips mipsel ppc s390 -DEFAULT_ARCHES = ia32 x64 arm -MODES = release debug optdebug -DEFAULT_MODES = release debug -ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ - android_mipsel - -# List of files that trigger Makefile regeneration: -GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ - gypfiles/shim_headers.gypi gypfiles/features.gypi \ - gypfiles/standalone.gypi \ - gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \ - gypfiles/cctest.gyp gypfiles/fuzzer.gyp \ - gypfiles/unittests.gyp gypfiles/v8.gyp \ - gypfiles/parser-shell.gyp gypfiles/gmock.gyp gypfiles/gtest.gyp \ - gypfiles/samples.gyp gypfiles/v8vtune.gyp gypfiles/d8.gyp \ - gypfiles/inspector-test.gyp gypfiles/mkgrokdump.gyp - -# Generates all combinations of ARCHES and MODES, e.g. "ia32.release". -BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) -ANDROID_BUILDS = $(foreach mode,$(MODES), \ - $(addsuffix .$(mode),$(ANDROID_ARCHES))) -# Generates corresponding test targets, e.g. "ia32.release.check". -CHECKS = $(addsuffix .check,$(BUILDS)) -QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS)) -ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) -# File where previously used GYPFLAGS are stored. -ENVFILE = $(OUTDIR)/environment - -.PHONY: all check clean builddeps dependencies $(ENVFILE).new native \ - qc quickcheck $(QUICKCHECKS) turbocheck \ - $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ - $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ - $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ - $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) - -# Target definitions. "all" is the default. -all: $(DEFAULT_MODES) - -# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile -# having been created before. -buildbot: - $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ - builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" - -# Compile targets. MODES and ARCHES are convenience targets. -.SECONDEXPANSION: -$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) - -$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) - -# Defines how to build a particular target (e.g. ia32.release). -$(BUILDS): $(OUTDIR)/Makefile.$$@ - @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ - BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ - python -c "print \ - raw_input().replace('opt', '').capitalize()") \ - builddir="$(shell pwd)/$(OUTDIR)/$@" - -native: $(OUTDIR)/Makefile.native - @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ - BUILDTYPE=Release \ - builddir="$(shell pwd)/$(OUTDIR)/$@" - -$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) - -$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android - @$(MAKE) -f Makefile.android $@ \ - ARCH="$(basename $@)" \ - MODE="$(subst .,,$(suffix $@))" \ - OUTDIR="$(OUTDIR)" \ - GYPFLAGS="$(GYPFLAGS)" - -# Test targets. -check: all - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ - $(TESTFLAGS) - -$(addsuffix .check,$(MODES)): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --mode=$(basename $@) $(TESTFLAGS) - -$(addsuffix .check,$(ARCHES)): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch=$(basename $@) $(TESTFLAGS) - -$(CHECKS): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(basename $@) $(TESTFLAGS) - -$(addsuffix .quickcheck,$(MODES)): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --mode=$(basename $@) $(TESTFLAGS) --quickcheck - -$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch=$(basename $@) $(TESTFLAGS) --quickcheck - -$(QUICKCHECKS): $$(basename $$@) - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck - -$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@) - @tools/android-sync.sh $(basename $@) $(OUTDIR) \ - $(shell pwd) $(ANDROID_V8) - -$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(basename $@) \ - --timeout=600 \ - --command-prefix="tools/android-run.py" $(TESTFLAGS) - -$(addsuffix .check, $(ANDROID_ARCHES)): \ - $(addprefix $$(basename $$@).,$(MODES)).check - -native.check: native - @gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ - --arch-and-mode=. $(TESTFLAGS) - -SUPERFASTTESTMODES = ia32.release -FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release -FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug - -COMMA = , -EMPTY = -SPACE = $(EMPTY) $(EMPTY) -quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES)) - gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \ - --download-data mozilla webkit - gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck -qc: quickcheck - -turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES)) - gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \ - --quickcheck --variants=turbofan --download-data mozilla webkit - gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \ - --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \ - --quickcheck --variants=turbofan -tc: turbocheck - -# Clean targets. You can clean each architecture individually, or everything. -$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)): - rm -f $(OUTDIR)/Makefile.$(basename $@)* - rm -rf $(OUTDIR)/$(basename $@).release - rm -rf $(OUTDIR)/$(basename $@).debug - rm -rf $(OUTDIR)/$(basename $@).optdebug - find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete - -native.clean: - rm -f $(OUTDIR)/Makefile.native - rm -rf $(OUTDIR)/native - find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete - -clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean - -# GYP file generation targets. -OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) -$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) - $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ - cut -f 2 -d " " | cut -f 1 -d "-" )) - $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst s390x,s390,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst powerpc,ppc,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst ppc64,ppc,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst ppcle,ppc,$(CXX_TARGET_ARCH))) - $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) - PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ - GYP_GENERATORS=make \ - tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ - -Igypfiles/standalone.gypi --depth=. \ - -Dv8_target_arch=$(V8_TARGET_ARCH) \ - $(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \ - -Dtarget_arch=$(V8_TARGET_ARCH), \ - $(if $(shell echo $(ARCHES32) | grep $(V8_TARGET_ARCH)), \ - -Dtarget_arch=ia32,)) \ - $(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \ - -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) - -$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) - PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ - GYP_GENERATORS=make \ - tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ - -Igypfiles/standalone.gypi --depth=. -S.native $(GYPFLAGS) - -# Replaces the old with the new environment file if they're different, which -# will trigger GYP to regenerate Makefiles. -$(ENVFILE): $(ENVFILE).new - @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \ - then rm $(ENVFILE).new; \ - else mv $(ENVFILE).new $(ENVFILE); fi - -# Stores current GYPFLAGS in a file. -$(ENVFILE).new: - $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ - cut -f 2 -d " " | cut -f 1 -d "-" )) - $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) - $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) - @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new; - -dependencies builddeps: - $(error Use 'gclient sync' instead) diff --git a/Makefile.android b/Makefile.android deleted file mode 100644 index 417152177d..0000000000 --- a/Makefile.android +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2012 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Those definitions should be consistent with the main Makefile -ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ - android_mipsel android_x87 -MODES = release debug - -# Generates all combinations of ANDROID ARCHES and MODES, -# e.g. "android_ia32.release" or "android_arm.release" -ANDROID_BUILDS = $(foreach mode,$(MODES), \ - $(addsuffix .$(mode),$(ANDROID_ARCHES))) - -ifeq ($(ARCH), android_arm) - DEFINES = target_arch=arm v8_target_arch=arm -else ifeq ($(ARCH), android_arm64) - DEFINES = target_arch=arm64 v8_target_arch=arm64 -else ifeq ($(ARCH), android_mipsel) - DEFINES = target_arch=mipsel v8_target_arch=mipsel -else ifeq ($(ARCH), android_ia32) - DEFINES = target_arch=ia32 v8_target_arch=ia32 -else ifeq ($(ARCH), android_x64) - DEFINES = target_arch=x64 v8_target_arch=x64 -else ifeq ($(ARCH), android_x87) - DEFINES = target_arch=ia32 v8_target_arch=x87 -else - $(error Target architecture "${ARCH}" is not supported) -endif - -# Common flags. -DEFINES += OS=android - -.SECONDEXPANSION: -$(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$@ - @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ - BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ - python -c "print raw_input().capitalize()") \ - builddir="$(shell pwd)/$(OUTDIR)/$@" - -# Android GYP file generation targets. -ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS)) -$(ANDROID_MAKEFILES): - GYP_GENERATORS=make-android \ - GYP_DEFINES="${DEFINES}" \ - PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH)" \ - tools/gyp/gyp --generator-output="${OUTDIR}" gypfiles/all.gyp \ - -Igypfiles/standalone.gypi --depth=. \ - -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 12d27d02c8..e6dbb79395 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -286,39 +286,6 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): return [] -def _CheckMissingFiles(input_api, output_api): - """Runs verify_source_deps.py to ensure no files were added that are not in - GN. - """ - # We need to wait until we have an input_api object and use this - # roundabout construct to import checkdeps because this file is - # eval-ed and thus doesn't have __file__. - original_sys_path = sys.path - try: - sys.path = [input_api.os_path.join(input_api.PresubmitLocalPath(), - 'gypfiles')] + sys.path - from verify_source_deps import missing_gn_files, missing_gyp_files - finally: - # Restore sys.path to what it was before. - sys.path = original_sys_path - - gn_files = missing_gn_files() - gyp_files = missing_gyp_files() - results = [] - - if gn_files: - results.append(output_api.PresubmitError( - "You added one or more source files but didn't update the\n" - "corresponding BUILD.gn files:\n", - gn_files)) - if gyp_files: - results.append(output_api.PresubmitError( - "You added one or more source files but didn't update the\n" - "corresponding gyp files:\n", - gyp_files)) - return results - - def _CommonChecks(input_api, output_api): """Checks common to both upload and commit.""" results = [] @@ -334,7 +301,6 @@ def _CommonChecks(input_api, output_api): results.extend(_CheckHeadersHaveIncludeGuards(input_api, output_api)) results.extend( _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api)) - results.extend(_CheckMissingFiles(input_api, output_api)) results.extend(_CheckJSONFiles(input_api, output_api)) results.extend(_CheckMacroUndefs(input_api, output_api)) results.extend(input_api.RunTests( diff --git a/WATCHLISTS b/WATCHLISTS index 4aa5f2b80a..462cd87db5 100644 --- a/WATCHLISTS +++ b/WATCHLISTS @@ -64,9 +64,6 @@ 'merges': { 'filepath': '.', }, - 'gypfiles': { - 'filepath': 'gypfiles/', - }, 'inspector': { 'filepath': 'inspector', }, @@ -116,9 +113,6 @@ # Only enabled on branches created with tools/release/create_release.py # 'v8-merges@googlegroups.com', ], - 'gypfiles': [ - 'machenbach@chromium.org', - ], 'inspector': [ 'devtools-reviews@chromium.org', ], diff --git a/gypfiles/OWNERS b/gypfiles/OWNERS deleted file mode 100644 index 0e56af3129..0000000000 --- a/gypfiles/OWNERS +++ /dev/null @@ -1 +0,0 @@ -machenbach@chromium.org diff --git a/gypfiles/README.txt b/gypfiles/README.txt deleted file mode 100644 index 5f242ada34..0000000000 --- a/gypfiles/README.txt +++ /dev/null @@ -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. - diff --git a/gypfiles/all.gyp b/gypfiles/all.gyp deleted file mode 100644 index 5592ee1b36..0000000000 --- a/gypfiles/all.gyp +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2011 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'All', - 'type': 'none', - 'dependencies': [ - 'd8.gyp:d8', - 'inspector-test.gyp:*', - 'mkgrokdump.gyp:*', - ], - 'conditions': [ - ['component!="shared_library"', { - 'dependencies': [ - 'parser-shell.gyp:parser-shell', - ], - }], - # These items don't compile for Android on Mac. - ['host_os!="mac" or OS!="android"', { - 'dependencies': [ - 'samples.gyp:*', - 'cctest.gyp:*', - 'fuzzer.gyp:*', - 'unittests.gyp:*', - ], - }], - ] - } - ] -} diff --git a/gypfiles/cctest.gyp b/gypfiles/cctest.gyp deleted file mode 100644 index 6e7fddae0b..0000000000 --- a/gypfiles/cctest.gyp +++ /dev/null @@ -1,468 +0,0 @@ -# Copyright 2012 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'v8_code': 1, - 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc', - 'cctest_sources': [ - '../test/cctest/compiler/c-signature.h', - '../test/cctest/compiler/call-tester.h', - '../test/cctest/compiler/codegen-tester.cc', - '../test/cctest/compiler/codegen-tester.h', - '../test/cctest/compiler/code-assembler-tester.h', - '../test/cctest/compiler/function-tester.cc', - '../test/cctest/compiler/function-tester.h', - '../test/cctest/compiler/graph-builder-tester.h', - '../test/cctest/compiler/test-basic-block-profiler.cc', - '../test/cctest/compiler/test-branch-combine.cc', - '../test/cctest/compiler/test-run-unwinding-info.cc', - '../test/cctest/compiler/test-gap-resolver.cc', - '../test/cctest/compiler/test-graph-visualizer.cc', - '../test/cctest/compiler/test-code-generator.cc', - '../test/cctest/compiler/test-code-assembler.cc', - '../test/cctest/compiler/test-instruction.cc', - '../test/cctest/compiler/test-js-context-specialization.cc', - '../test/cctest/compiler/test-js-constant-cache.cc', - '../test/cctest/compiler/test-js-typed-lowering.cc', - '../test/cctest/compiler/test-jump-threading.cc', - '../test/cctest/compiler/test-linkage.cc', - '../test/cctest/compiler/test-loop-analysis.cc', - '../test/cctest/compiler/test-machine-operator-reducer.cc', - '../test/cctest/compiler/test-multiple-return.cc', - '../test/cctest/compiler/test-node.cc', - '../test/cctest/compiler/test-operator.cc', - '../test/cctest/compiler/test-representation-change.cc', - '../test/cctest/compiler/test-run-bytecode-graph-builder.cc', - '../test/cctest/compiler/test-run-calls-to-external-references.cc', - '../test/cctest/compiler/test-run-deopt.cc', - '../test/cctest/compiler/test-run-intrinsics.cc', - '../test/cctest/compiler/test-run-jsbranches.cc', - '../test/cctest/compiler/test-run-jscalls.cc', - '../test/cctest/compiler/test-run-jsexceptions.cc', - '../test/cctest/compiler/test-run-jsobjects.cc', - '../test/cctest/compiler/test-run-jsops.cc', - '../test/cctest/compiler/test-run-load-store.cc', - '../test/cctest/compiler/test-run-machops.cc', - '../test/cctest/compiler/test-run-native-calls.cc', - '../test/cctest/compiler/test-run-retpoline.cc', - '../test/cctest/compiler/test-run-stackcheck.cc', - '../test/cctest/compiler/test-run-stubs.cc', - '../test/cctest/compiler/test-run-tail-calls.cc', - '../test/cctest/compiler/test-run-variables.cc', - '../test/cctest/compiler/test-run-wasm-machops.cc', - '../test/cctest/compiler/value-helper.cc', - '../test/cctest/compiler/value-helper.h', - '../test/cctest/cctest.cc', - '../test/cctest/cctest.h', - '../test/cctest/expression-type-collector-macros.h', - '../test/cctest/gay-fixed.cc', - '../test/cctest/gay-fixed.h', - '../test/cctest/gay-precision.cc', - '../test/cctest/gay-precision.h', - '../test/cctest/gay-shortest.cc', - '../test/cctest/gay-shortest.h', - '../test/cctest/heap/heap-tester.h', - '../test/cctest/heap/heap-utils.cc', - '../test/cctest/heap/heap-utils.h', - '../test/cctest/heap/test-alloc.cc', - '../test/cctest/heap/test-array-buffer-tracker.cc', - '../test/cctest/heap/test-compaction.cc', - '../test/cctest/heap/test-concurrent-marking.cc', - '../test/cctest/heap/test-embedder-tracing.cc', - '../test/cctest/heap/test-heap.cc', - '../test/cctest/heap/test-incremental-marking.cc', - '../test/cctest/heap/test-invalidated-slots.cc', - '../test/cctest/heap/test-lab.cc', - '../test/cctest/heap/test-mark-compact.cc', - '../test/cctest/heap/test-page-promotion.cc', - '../test/cctest/heap/test-spaces.cc', - '../test/cctest/interpreter/interpreter-tester.cc', - '../test/cctest/interpreter/interpreter-tester.h', - '../test/cctest/interpreter/source-position-matcher.cc', - '../test/cctest/interpreter/source-position-matcher.h', - '../test/cctest/interpreter/test-bytecode-generator.cc', - '../test/cctest/interpreter/test-interpreter.cc', - '../test/cctest/interpreter/test-interpreter-intrinsics.cc', - '../test/cctest/interpreter/test-source-positions.cc', - '../test/cctest/interpreter/bytecode-expectations-printer.cc', - '../test/cctest/interpreter/bytecode-expectations-printer.h', - '../test/cctest/libplatform/test-tracing.cc', - '../test/cctest/libsampler/test-sampler.cc', - '../test/cctest/parsing/test-parse-decision.cc', - '../test/cctest/parsing/test-preparser.cc', - '../test/cctest/parsing/test-scanner-streams.cc', - '../test/cctest/parsing/test-scanner.cc', - '../test/cctest/print-extension.cc', - '../test/cctest/print-extension.h', - '../test/cctest/profiler-extension.cc', - '../test/cctest/profiler-extension.h', - '../test/cctest/scope-test-helper.h', - '../test/cctest/setup-isolate-for-tests.cc', - '../test/cctest/setup-isolate-for-tests.h', - '../test/cctest/test-access-checks.cc', - '../test/cctest/test-accessor-assembler.cc', - '../test/cctest/test-accessors.cc', - '../test/cctest/test-allocation.cc', - '../test/cctest/test-api.cc', - '../test/cctest/test-api.h', - '../test/cctest/test-api-accessors.cc', - '../test/cctest/test-api-interceptors.cc', - '../test/cctest/test-array-list.cc', - '../test/cctest/test-atomicops.cc', - '../test/cctest/test-bignum.cc', - '../test/cctest/test-bignum-dtoa.cc', - '../test/cctest/test-bit-vector.cc', - '../test/cctest/test-circular-queue.cc', - '../test/cctest/test-code-layout.cc', - '../test/cctest/test-code-stub-assembler.cc', - '../test/cctest/test-compiler.cc', - '../test/cctest/test-constantpool.cc', - '../test/cctest/test-conversions.cc', - '../test/cctest/test-cpu-profiler.cc', - '../test/cctest/test-date.cc', - '../test/cctest/test-debug.cc', - '../test/cctest/test-decls.cc', - '../test/cctest/test-deoptimization.cc', - '../test/cctest/test-dictionary.cc', - '../test/cctest/test-diy-fp.cc', - '../test/cctest/test-double.cc', - '../test/cctest/test-dtoa.cc', - '../test/cctest/test-elements-kind.cc', - '../test/cctest/test-fast-dtoa.cc', - '../test/cctest/test-feedback-vector.cc', - '../test/cctest/test-feedback-vector.h', - '../test/cctest/test-field-type-tracking.cc', - '../test/cctest/test-fixed-dtoa.cc', - '../test/cctest/test-flags.cc', - '../test/cctest/test-func-name-inference.cc', - '../test/cctest/test-global-handles.cc', - '../test/cctest/test-global-object.cc', - '../test/cctest/test-hashcode.cc', - '../test/cctest/test-hashmap.cc', - '../test/cctest/test-heap-profiler.cc', - '../test/cctest/test-identity-map.cc', - '../test/cctest/test-intl.cc', - '../test/cctest/test-inobject-slack-tracking.cc', - '../test/cctest/test-isolate-independent-builtins.cc', - '../test/cctest/test-liveedit.cc', - '../test/cctest/test-lockers.cc', - '../test/cctest/test-log.cc', - '../test/cctest/test-managed.cc', - '../test/cctest/test-mementos.cc', - '../test/cctest/test-modules.cc', - '../test/cctest/test-object.cc', - '../test/cctest/test-orderedhashtable.cc', - '../test/cctest/test-parsing.cc', - '../test/cctest/test-platform.cc', - '../test/cctest/test-profile-generator.cc', - '../test/cctest/test-random-number-generator.cc', - '../test/cctest/test-regexp.cc', - '../test/cctest/test-representation.cc', - '../test/cctest/test-sampler-api.cc', - '../test/cctest/test-serialize.cc', - '../test/cctest/test-strings.cc', - '../test/cctest/test-symbols.cc', - '../test/cctest/test-strtod.cc', - '../test/cctest/test-thread-termination.cc', - '../test/cctest/test-threads.cc', - '../test/cctest/test-trace-event.cc', - '../test/cctest/test-traced-value.cc', - '../test/cctest/test-transitions.cc', - '../test/cctest/test-transitions.h', - '../test/cctest/test-typedarrays.cc', - '../test/cctest/test-types.cc', - '../test/cctest/test-unbound-queue.cc', - '../test/cctest/test-unboxed-doubles.cc', - '../test/cctest/test-unscopables-hidden-prototype.cc', - '../test/cctest/test-usecounters.cc', - '../test/cctest/test-utils.cc', - '../test/cctest/test-version.cc', - '../test/cctest/test-weakmaps.cc', - '../test/cctest/test-weaksets.cc', - '../test/cctest/trace-extension.cc', - '../test/cctest/trace-extension.h', - '../test/cctest/types-fuzz.h', - '../test/cctest/unicode-helpers.h', - '../test/cctest/wasm/test-c-wasm-entry.cc', - '../test/cctest/wasm/test-streaming-compilation.cc', - '../test/cctest/wasm/test-run-wasm.cc', - '../test/cctest/wasm/test-run-wasm-64.cc', - '../test/cctest/wasm/test-run-wasm-asmjs.cc', - '../test/cctest/wasm/test-run-wasm-atomics.cc', - '../test/cctest/wasm/test-run-wasm-interpreter.cc', - '../test/cctest/wasm/test-run-wasm-js.cc', - '../test/cctest/wasm/test-run-wasm-module.cc', - '../test/cctest/wasm/test-run-wasm-relocation.cc', - '../test/cctest/wasm/test-run-wasm-sign-extension.cc', - '../test/cctest/wasm/test-run-wasm-simd.cc', - '../test/cctest/wasm/test-wasm-breakpoints.cc', - "../test/cctest/wasm/test-wasm-codegen.cc", - '../test/cctest/wasm/test-wasm-interpreter-entry.cc', - '../test/cctest/wasm/test-wasm-stack.cc', - '../test/cctest/wasm/test-wasm-trap-position.cc', - '../test/cctest/wasm/wasm-run-utils.cc', - '../test/cctest/wasm/wasm-run-utils.h', - ], - 'cctest_sources_ia32': [ - '../test/cctest/test-assembler-ia32.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-ia32.cc', - '../test/cctest/test-disasm-ia32.cc', - '../test/cctest/test-log-stack-tracer.cc', - '../test/cctest/test-run-wasm-relocation-ia32.cc', - ], - 'cctest_sources_x64': [ - '../test/cctest/test-assembler-x64.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-x64.cc', - '../test/cctest/test-disasm-x64.cc', - '../test/cctest/test-macro-assembler-x64.cc', - '../test/cctest/test-log-stack-tracer.cc', - '../test/cctest/test-run-wasm-relocation-x64.cc', - ], - 'cctest_sources_arm': [ - '../test/cctest/assembler-helper-arm.cc', - '../test/cctest/assembler-helper-arm.h', - '../test/cctest/test-assembler-arm.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-arm.cc', - '../test/cctest/test-disasm-arm.cc', - '../test/cctest/test-macro-assembler-arm.cc', - '../test/cctest/test-run-wasm-relocation-arm.cc', - '../test/cctest/test-sync-primitives-arm.cc', - ], - 'cctest_sources_arm64': [ - '../test/cctest/test-utils-arm64.cc', - '../test/cctest/test-utils-arm64.h', - '../test/cctest/test-assembler-arm64.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-arm64.cc', - '../test/cctest/test-disasm-arm64.cc', - '../test/cctest/test-fuzz-arm64.cc', - '../test/cctest/test-javascript-arm64.cc', - '../test/cctest/test-js-arm64-variables.cc', - '../test/cctest/test-run-wasm-relocation-arm64.cc', - '../test/cctest/test-sync-primitives-arm64.cc', - ], - 'cctest_sources_s390': [ - '../test/cctest/test-assembler-s390.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-disasm-s390.cc', - ], - 'cctest_sources_ppc': [ - '../test/cctest/test-assembler-ppc.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-disasm-ppc.cc', - ], - 'cctest_sources_mips': [ - '../test/cctest/test-assembler-mips.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-mips.cc', - '../test/cctest/test-disasm-mips.cc', - '../test/cctest/test-macro-assembler-mips.cc', - ], - 'cctest_sources_mipsel': [ - '../test/cctest/test-assembler-mips.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-mips.cc', - '../test/cctest/test-disasm-mips.cc', - '../test/cctest/test-macro-assembler-mips.cc', - ], - 'cctest_sources_mips64': [ - '../test/cctest/test-assembler-mips64.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-mips64.cc', - '../test/cctest/test-disasm-mips64.cc', - '../test/cctest/test-macro-assembler-mips64.cc', - ], - 'cctest_sources_mips64el': [ - '../test/cctest/test-assembler-mips64.cc', - '../test/cctest/test-code-stubs.cc', - '../test/cctest/test-code-stubs.h', - '../test/cctest/test-code-stubs-mips64.cc', - '../test/cctest/test-disasm-mips64.cc', - '../test/cctest/test-macro-assembler-mips64.cc', - ], - }, - 'includes': ['toolchain.gypi', 'features.gypi'], - 'targets': [ - { - 'target_name': 'cctest', - 'type': 'executable', - 'dependencies': [ - 'resources', - 'v8.gyp:v8_libbase', - 'v8.gyp:v8_libplatform', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/common/wasm/flag-utils.h', - '../test/common/wasm/test-signatures.h', - '../test/common/wasm/wasm-macro-gen.h', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '<@(cctest_sources)', - '<(generated_file)', - ], - 'conditions': [ - ['v8_target_arch=="ia32"', { - 'sources': [ - '<@(cctest_sources_ia32)', - ], - }], - ['v8_target_arch=="x64"', { - 'sources': [ - '<@(cctest_sources_x64)', - ], - }], - ['v8_target_arch=="arm"', { - 'sources': [ - '<@(cctest_sources_arm)', - ], - }], - ['v8_target_arch=="arm64"', { - 'sources': [ - '<@(cctest_sources_arm64)', - ], - }], - ['v8_target_arch=="s390"', { - 'sources': [ - '<@(cctest_sources_s390)', - ], - }], - ['v8_target_arch=="s390x"', { - 'sources': [ - '<@(cctest_sources_s390)', - ], - }], - ['v8_target_arch=="ppc"', { - 'sources': [ - '<@(cctest_sources_ppc)', - ], - }], - ['v8_target_arch=="ppc64"', { - 'sources': [ - '<@(cctest_sources_ppc)', - ], - }], - ['v8_target_arch=="mips"', { - 'sources': [ - '<@(cctest_sources_mips)', - ], - }], - ['v8_target_arch=="mipsel"', { - 'sources': [ - '<@(cctest_sources_mipsel)', - ], - }], - ['v8_target_arch=="mips64"', { - 'sources': [ - '<@(cctest_sources_mips64)', - ], - }], - ['v8_target_arch=="mips64el"', { - 'sources': [ - '<@(cctest_sources_mips64el)', - ], - }], - [ 'OS=="win"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - # MSVS wants this for gay-{precision,shortest}.cc. - 'AdditionalOptions': ['/bigobj'], - }, - }, - }], - ['v8_target_arch=="ppc" or v8_target_arch=="ppc64" \ - or v8_target_arch=="arm" or v8_target_arch=="arm64" \ - or v8_target_arch=="s390" or v8_target_arch=="s390x" \ - or v8_target_arch=="mips" or v8_target_arch=="mips64" \ - or v8_target_arch=="mipsel" or v8_target_arch=="mips64el"', { - # disable fmadd/fmsub so that expected results match generated code in - # RunFloat64MulAndFloat64Add1 and friends. - 'cflags': ['-ffp-contract=off'], - }], - ['OS=="aix"', { - 'ldflags': [ '-Wl,-bbigtoc' ], - }], - ['component=="shared_library"', { - # cctest can't be built against a shared library, so we need to - # depend on the underlying static target in that case. - 'dependencies': ['v8.gyp:v8_maybe_snapshot'], - 'defines': [ 'BUILDING_V8_SHARED', ] - }, { - 'dependencies': ['v8.gyp:v8'], - }], - ['v8_use_snapshot=="true"', { - 'dependencies': ['v8.gyp:v8_initializers'], - }], - ], - }, - { - 'target_name': 'resources', - 'type': 'none', - 'variables': { - 'file_list': [ - '../tools/splaytree.js', - '../tools/codemap.js', - '../tools/csvparser.js', - '../tools/consarray.js', - '../tools/profile.js', - '../tools/profile_view.js', - '../tools/arguments.js', - '../tools/logreader.js', - '../test/cctest/log-eq-of-logging-and-traversal.js', - ], - }, - 'actions': [ - { - 'action_name': 'js2c', - 'inputs': [ - '../tools/js2c.py', - '<@(file_list)', - ], - 'outputs': [ - '<(generated_file)', - ], - 'action': [ - 'python', - '../tools/js2c.py', - '<@(_outputs)', - 'TEST', # type - '<@(file_list)', - ], - } - ], - }, - { - 'target_name': 'generate-bytecode-expectations', - 'type': 'executable', - 'dependencies': [ - 'v8.gyp:v8', - 'v8.gyp:v8_libbase', - 'v8.gyp:v8_libplatform', - ], - 'include_dirs+': [ - '..', - ], - 'sources': [ - '../test/cctest/interpreter/bytecode-expectations-printer.cc', - '../test/cctest/interpreter/bytecode-expectations-printer.h', - '../test/cctest/interpreter/generate-bytecode-expectations.cc', - ], - }, - ], -} diff --git a/gypfiles/coverage_wrapper.py b/gypfiles/coverage_wrapper.py deleted file mode 100755 index d5fdee43cf..0000000000 --- a/gypfiles/coverage_wrapper.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# CC/CXX wrapper script that excludes certain file patterns from coverage -# instrumentation. - -import re -import subprocess -import sys - -exclusions = [ - 'buildtools', - 'src/third_party', - 'third_party', - 'test', - 'testing', -] - -def remove_if_exists(string_list, item): - if item in string_list: - string_list.remove(item) - -args = sys.argv[1:] -text = ' '.join(sys.argv[2:]) -for exclusion in exclusions: - if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): - remove_if_exists(args, '-fprofile-arcs') - remove_if_exists(args, '-ftest-coverage') - remove_if_exists(args, '-fsanitize-coverage=func') - remove_if_exists(args, '-fsanitize-coverage=bb') - remove_if_exists(args, '-fsanitize-coverage=edge') - remove_if_exists(args, '-fsanitize-coverage=trace-pc-guard') - remove_if_exists(args, '-fsanitize-coverage=bb,trace-pc-guard') - break - -sys.exit(subprocess.check_call(args)) diff --git a/gypfiles/d8.gyp b/gypfiles/d8.gyp deleted file mode 100644 index f593a2b044..0000000000 --- a/gypfiles/d8.gyp +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 2018 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'v8_code': 1, - # Enable support for Intel VTune. Supported on ia32/x64 only - 'v8_enable_vtunejit%': 0, - 'v8_enable_i18n_support%': 1, - }, - 'includes': ['toolchain.gypi', 'features.gypi'], - 'targets': [ - { - 'target_name': 'd8', - 'type': 'executable', - 'dependencies': [ - 'v8.gyp:v8', - 'v8.gyp:v8_libbase', - 'v8.gyp:v8_libplatform', - ], - # Generated source files need this explicitly: - 'include_dirs+': [ - '..', - '<(DEPTH)', - ], - 'sources': [ - '../src/d8.h', - '../src/d8.cc', - '../src/d8-console.h', - '../src/d8-console.cc', - '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', - ], - 'conditions': [ - [ 'want_separate_host_toolset==1', { - 'toolsets': [ 'target', ], - 'dependencies': [ - 'd8_js2c#host', - ], - }, { - 'dependencies': [ - 'd8_js2c', - ], - }], - ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \ - or OS=="openbsd" or OS=="solaris" or OS=="android" \ - or OS=="qnx" or OS=="aix")', { - 'sources': [ '../src/d8-posix.cc', ] - }], - [ 'OS=="win"', { - 'sources': [ '../src/d8-windows.cc', ] - }], - [ 'component!="shared_library"', { - 'conditions': [ - [ 'v8_postmortem_support=="true"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-force_load,<(PRODUCT_DIR)/libv8_base.a' - ], - }, - }], - ], - }], - ['v8_enable_vtunejit==1', { - 'dependencies': [ - 'v8vtune.gyp:v8_vtune', - ], - }], - ['v8_enable_i18n_support==1', { - 'dependencies': [ - '<(icu_gyp_path):icui18n', - '<(icu_gyp_path):icuuc', - ], - }], - ['OS=="win" and v8_enable_i18n_support==1', { - 'dependencies': [ - '<(icu_gyp_path):icudata', - ], - }], - ], - }, - { - 'target_name': 'd8_js2c', - 'type': 'none', - 'variables': { - 'js_files': [ - '../src/d8.js', - '../src/js/macros.py', - ], - }, - 'conditions': [ - [ 'want_separate_host_toolset==1', { - 'toolsets': ['host'], - }, { - 'toolsets': ['target'], - }] - ], - 'actions': [ - { - 'action_name': 'd8_js2c', - 'inputs': [ - '../tools/js2c.py', - '<@(js_files)', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', - ], - 'action': [ - 'python', - '../tools/js2c.py', - '<@(_outputs)', - 'D8', - '<@(js_files)' - ], - }, - ], - }, - ], -} diff --git a/gypfiles/features.gypi b/gypfiles/features.gypi deleted file mode 100644 index 1f2a99db3f..0000000000 --- a/gypfiles/features.gypi +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Compile time controlled V8 features. - -{ - 'variables': { - 'variables': { - 'v8_target_arch%': '<(target_arch)', - }, - - # Allows the embedder to add a custom suffix to the version string. - 'v8_embedder_string%': '', - - 'v8_enable_disassembler%': 0, - - 'v8_promise_internal_field_count%': 0, - - 'v8_enable_gdbjit%': 0, - - 'v8_enable_verify_csa%': 0, - - 'v8_object_print%': 0, - - 'v8_enable_verify_heap%': 0, - - 'v8_trace_maps%': 0, - - # Enable the snapshot feature, for fast context creation. - # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html - 'v8_use_snapshot%': 'true', - - 'v8_enable_verify_predictable%': 0, - - # With post mortem support enabled, metadata is embedded into libv8 that - # describes various parameters of the VM for use by debuggers. See - # tools/gen-postmortem-metadata.py for details. - 'v8_postmortem_support%': 'false', - - # Interpreted regexp engine exists as platform-independent alternative - # based where the regular expression is compiled to a bytecode. - 'v8_interpreted_regexp%': 0, - - # Enable ECMAScript Internationalization API. Enabling this feature will - # add a dependency on the ICU library. - 'v8_enable_i18n_support%': 1, - - # Enable compiler warnings when using V8_DEPRECATED apis. - 'v8_deprecation_warnings%': 0, - - # Enable compiler warnings when using V8_DEPRECATE_SOON apis. - 'v8_imminent_deprecation_warnings%': 0, - - # Set to 1 to enable DCHECKs in release builds. - 'dcheck_always_on%': 0, - - # Enable/disable JavaScript API accessors. - 'v8_js_accessors%': 0, - - # Temporary flag to allow embedders to update their microtasks scopes. - 'v8_check_microtasks_scopes_consistency%': 'false', - - # Enable concurrent marking. - 'v8_enable_concurrent_marking%': 1, - - # Enables various testing features. - 'v8_enable_test_features%': 0, - - # Controls the threshold for on-heap/off-heap Typed Arrays. - 'v8_typed_array_max_size_in_heap%': 64, - }, - 'target_defaults': { - 'conditions': [ - ['v8_embedder_string!=""', { - 'defines': ['V8_EMBEDDER_STRING="<(v8_embedder_string)"',], - }], - ['v8_enable_disassembler==1', { - 'defines': ['ENABLE_DISASSEMBLER',], - }], - ['v8_promise_internal_field_count!=0', { - 'defines': ['V8_PROMISE_INTERNAL_FIELD_COUNT','v8_promise_internal_field_count'], - }], - ['v8_enable_gdbjit==1', { - 'defines': ['ENABLE_GDB_JIT_INTERFACE',], - }], - ['v8_enable_verify_csa==1', { - 'defines': ['ENABLE_VERIFY_CSA',], - }], - ['v8_object_print==1', { - 'defines': ['OBJECT_PRINT',], - }], - ['v8_enable_verify_heap==1', { - 'defines': ['VERIFY_HEAP',], - }], - ['v8_trace_maps==1', { - 'defines': ['V8_TRACE_MAPS',], - }], - ['v8_enable_test_features==1', { - 'defines': ['V8_ENABLE_ALLOCATION_TIMEOUT', 'V8_ENABLE_FORCE_SLOW_PATH'], - }], - ['v8_enable_verify_predictable==1', { - 'defines': ['VERIFY_PREDICTABLE',], - }], - ['v8_interpreted_regexp==1', { - 'defines': ['V8_INTERPRETED_REGEXP',], - }], - ['v8_deprecation_warnings==1', { - 'defines': ['V8_DEPRECATION_WARNINGS',], - }], - ['v8_imminent_deprecation_warnings==1', { - 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',], - }], - ['v8_enable_i18n_support==1', { - 'defines': ['V8_INTL_SUPPORT',], - }], - ['v8_use_snapshot=="true" and v8_use_external_startup_data==1', { - 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',], - }], - ['dcheck_always_on!=0', { - 'defines': ['DEBUG',], - }], - ['v8_check_microtasks_scopes_consistency=="true"', { - 'defines': ['V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY',], - }], - ['v8_enable_concurrent_marking==1', { - 'defines': ['V8_CONCURRENT_MARKING',], - }], - ], # conditions - 'configurations': { - 'DebugBaseCommon': { - 'abstract': 1, - 'variables': { - 'v8_enable_handle_zapping%': 1, - }, - 'conditions': [ - ['v8_enable_handle_zapping==1', { - 'defines': ['ENABLE_HANDLE_ZAPPING',], - }], - ], - }, # Debug - 'Release': { - 'variables': { - 'v8_enable_handle_zapping%': 1, - }, - 'conditions': [ - ['v8_enable_handle_zapping==1', { - 'defines': ['ENABLE_HANDLE_ZAPPING',], - }], - ], # conditions - }, # Release - }, # configurations - 'defines': [ - 'V8_GYP_BUILD', - 'V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=<(v8_typed_array_max_size_in_heap)', - ], # defines - }, # target_defaults -} diff --git a/gypfiles/fuzzer.gyp b/gypfiles/fuzzer.gyp deleted file mode 100644 index f65b7dc6d0..0000000000 --- a/gypfiles/fuzzer.gyp +++ /dev/null @@ -1,518 +0,0 @@ -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'v8_code': 1, - }, - 'includes': ['toolchain.gypi', 'features.gypi'], - 'targets': [ - { - 'target_name': 'v8_simple_json_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'json_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'json_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/json.cc', - ], - }, - { - 'target_name': 'v8_simple_parser_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'parser_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'parser_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/parser.cc', - ], - }, - { - 'target_name': 'v8_simple_regexp_builtins_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'regexp_builtins_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'regexp_builtins_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/regexp-builtins.cc', - '../test/fuzzer/regexp_builtins/mjsunit.js.h', - ], - }, - { - 'target_name': 'v8_simple_regexp_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'regexp_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'regexp_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/regexp.cc', - ], - }, - { - 'target_name': 'v8_simple_multi_return_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'multi_return_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'multi_return_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/cctest/compiler/c-signature.h', - '../test/cctest/compiler/call-helper.h', - '../test/cctest/compiler/raw-machine-assembler-tester.h', - '../test/fuzzer/multi-return.cc', - ], - }, - { - 'target_name': 'v8_simple_wasm_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_async_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_async_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_async_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-async.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_code_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_code_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_code_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-code.cc', - '../test/common/wasm/test-signatures.h', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_compile_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_compile_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_compile_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-compile.cc', - '../test/common/wasm/test-signatures.h', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_data_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_data_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_data_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-data-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_function_sigs_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_function_sigs_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_function_sigs_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-function-sigs-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_globals_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_globals_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_globals_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-globals-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_imports_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_imports_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_imports_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-imports-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_memory_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_memory_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_memory_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-memory-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_names_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_names_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_names_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-names-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'v8_simple_wasm_types_section_fuzzer', - 'type': 'executable', - 'dependencies': [ - 'wasm_types_section_fuzzer_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer.cc', - ], - }, - { - 'target_name': 'wasm_types_section_fuzzer_lib', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'fuzzer_support', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/wasm-types-section.cc', - '../test/common/wasm/wasm-module-runner.cc', - '../test/common/wasm/wasm-module-runner.h', - '../test/fuzzer/wasm-fuzzer-common.cc', - '../test/fuzzer/wasm-fuzzer-common.h', - ], - }, - { - 'target_name': 'fuzzer_support', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8', - 'v8.gyp:v8_libbase', - 'v8.gyp:v8_libplatform', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/fuzzer/fuzzer-support.cc', - '../test/fuzzer/fuzzer-support.h', - ], - 'conditions': [ - ['v8_enable_i18n_support==1', { - 'dependencies': [ - '<(icu_gyp_path):icui18n', - '<(icu_gyp_path):icuuc', - ], - }], - ], - }, - ], -} diff --git a/gypfiles/gmock.gyp b/gypfiles/gmock.gyp deleted file mode 100644 index a80387298b..0000000000 --- a/gypfiles/gmock.gyp +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2014 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'gmock', - 'type': 'static_library', - 'dependencies': [ - 'gtest.gyp:gtest', - ], - 'sources': [ - # Sources based on files in r173 of gmock. - '../testing/gmock/include/gmock/gmock-actions.h', - '../testing/gmock/include/gmock/gmock-cardinalities.h', - '../testing/gmock/include/gmock/gmock-generated-actions.h', - '../testing/gmock/include/gmock/gmock-generated-function-mockers.h', - '../testing/gmock/include/gmock/gmock-generated-matchers.h', - '../testing/gmock/include/gmock/gmock-generated-nice-strict.h', - '../testing/gmock/include/gmock/gmock-matchers.h', - '../testing/gmock/include/gmock/gmock-spec-builders.h', - '../testing/gmock/include/gmock/gmock.h', - '../testing/gmock/include/gmock/internal/gmock-generated-internal-utils.h', - '../testing/gmock/include/gmock/internal/gmock-internal-utils.h', - '../testing/gmock/include/gmock/internal/gmock-port.h', - '../testing/gmock/src/gmock-all.cc', - '../testing/gmock/src/gmock-cardinalities.cc', - '../testing/gmock/src/gmock-internal-utils.cc', - '../testing/gmock/src/gmock-matchers.cc', - '../testing/gmock/src/gmock-spec-builders.cc', - '../testing/gmock/src/gmock.cc', - '../testing/gmock-support.h', # gMock helpers - '../testing/gmock_custom/gmock/internal/custom/gmock-port.h', - ], - 'sources!': [ - '../testing/gmock/src/gmock-all.cc', # Not needed by our build. - ], - 'include_dirs': [ - '../testing/gmock_custom', - '../testing/gmock', - '../testing/gmock/include', - ], - 'all_dependent_settings': { - 'include_dirs': [ - '../testing/gmock_custom', - '../testing/gmock/include', # So that gmock headers can find themselves. - ], - }, - 'export_dependent_settings': [ - 'gtest.gyp:gtest', - ], - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - }, { - 'toolsets': ['target'], - }], - ], - }, - { - 'target_name': 'gmock_main', - 'type': 'static_library', - 'dependencies': [ - 'gmock', - ], - 'sources': [ - '../testing/gmock/src/gmock_main.cc', - ], - }, - ], -} diff --git a/gypfiles/gtest.gyp b/gypfiles/gtest.gyp deleted file mode 100644 index 82ae105293..0000000000 --- a/gypfiles/gtest.gyp +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2014 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'gtest', - 'toolsets': ['host', 'target'], - 'type': 'static_library', - 'sources': [ - '../testing/gtest/include/gtest/gtest-death-test.h', - '../testing/gtest/include/gtest/gtest-message.h', - '../testing/gtest/include/gtest/gtest-param-test.h', - '../testing/gtest/include/gtest/gtest-printers.h', - '../testing/gtest/include/gtest/gtest-spi.h', - '../testing/gtest/include/gtest/gtest-test-part.h', - '../testing/gtest/include/gtest/gtest-typed-test.h', - '../testing/gtest/include/gtest/gtest.h', - '../testing/gtest/include/gtest/gtest_pred_impl.h', - '../testing/gtest/include/gtest/internal/gtest-death-test-internal.h', - '../testing/gtest/include/gtest/internal/gtest-filepath.h', - '../testing/gtest/include/gtest/internal/gtest-internal.h', - '../testing/gtest/include/gtest/internal/gtest-linked_ptr.h', - '../testing/gtest/include/gtest/internal/gtest-param-util-generated.h', - '../testing/gtest/include/gtest/internal/gtest-param-util.h', - '../testing/gtest/include/gtest/internal/gtest-port.h', - '../testing/gtest/include/gtest/internal/gtest-string.h', - '../testing/gtest/include/gtest/internal/gtest-tuple.h', - '../testing/gtest/include/gtest/internal/gtest-type-util.h', - '../testing/gtest/src/gtest-all.cc', - '../testing/gtest/src/gtest-death-test.cc', - '../testing/gtest/src/gtest-filepath.cc', - '../testing/gtest/src/gtest-internal-inl.h', - '../testing/gtest/src/gtest-port.cc', - '../testing/gtest/src/gtest-printers.cc', - '../testing/gtest/src/gtest-test-part.cc', - '../testing/gtest/src/gtest-typed-test.cc', - '../testing/gtest/src/gtest.cc', - '../testing/gtest-support.h', - ], - 'sources!': [ - '../testing/gtest/src/gtest-all.cc', # Not needed by our build. - ], - 'include_dirs': [ - '../testing/gtest', - '../testing/gtest/include', - ], - 'dependencies': [ - 'gtest_prod', - ], - 'defines': [ - # In order to allow regex matches in gtest to be shared between Windows - # and other systems, we tell gtest to always use it's internal engine. - 'GTEST_HAS_POSIX_RE=0', - 'GTEST_LANG_CXX11=1', - ], - 'all_dependent_settings': { - 'defines': [ - 'GTEST_HAS_POSIX_RE=0', - 'GTEST_LANG_CXX11=1', - ], - }, - 'conditions': [ - ['OS=="android"', { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - }, - }], - ], - 'direct_dependent_settings': { - 'defines': [ - 'UNIT_TEST', - ], - 'include_dirs': [ - '../testing/gtest/include', # So that gtest headers can find themselves. - ], - 'target_conditions': [ - ['_type=="executable"', { - 'test': 1, - 'conditions': [ - ['OS=="mac"', { - 'run_as': { - 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], - }, - }], - ['OS=="win"', { - 'run_as': { - 'action????': ['$(TargetPath)', '--gtest_print_time'], - }, - }], - ], - }], - ], - 'msvs_disabled_warnings': [4800], - }, - }, - { - 'target_name': 'gtest_main', - 'type': 'static_library', - 'dependencies': [ - 'gtest', - ], - 'sources': [ - '../testing/gtest/src/gtest_main.cc', - ], - }, - { - 'target_name': 'gtest_prod', - 'toolsets': ['host', 'target'], - 'type': 'none', - 'sources': [ - '../testing/gtest/include/gtest/gtest_prod.h', - ], - }, - ], -} diff --git a/gypfiles/gyp_environment.py b/gypfiles/gyp_environment.py deleted file mode 100644 index fe6b51f28a..0000000000 --- a/gypfiles/gyp_environment.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2015 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Sets up various automatic gyp environment variables. These are used by -gyp_v8 and landmines.py which run at different stages of runhooks. To -make sure settings are consistent between them, all setup should happen here. -""" - -import os -import sys - -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) -V8_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) - - -def apply_gyp_environment(file_path=None): - """ - Reads in a *.gyp_env file and applies the valid keys to os.environ. - """ - if not file_path or not os.path.exists(file_path): - return - file_contents = open(file_path).read() - try: - file_data = eval(file_contents, {'__builtins__': None}, None) - except SyntaxError, e: - e.filename = os.path.abspath(file_path) - raise - supported_vars = ( 'V8_GYP_FILE', - 'V8_GYP_SYNTAX_CHECK', - 'GYP_DEFINES', - 'GYP_GENERATORS', - 'GYP_GENERATOR_FLAGS', - 'GYP_GENERATOR_OUTPUT', ) - for var in supported_vars: - val = file_data.get(var) - if val: - if var in os.environ: - print 'INFO: Environment value for "%s" overrides value in %s.' % ( - var, os.path.abspath(file_path) - ) - else: - os.environ[var] = val - - -def set_environment(): - """Sets defaults for GYP_* variables.""" - - if 'SKIP_V8_GYP_ENV' not in os.environ: - # Update the environment based on v8.gyp_env - gyp_env_path = os.path.join(os.path.dirname(V8_ROOT), 'v8.gyp_env') - apply_gyp_environment(gyp_env_path) - - if not os.environ.get('GYP_GENERATORS'): - # Default to ninja on all platforms. - os.environ['GYP_GENERATORS'] = 'ninja' diff --git a/gypfiles/gyp_v8 b/gypfiles/gyp_v8 deleted file mode 100755 index 62e13d86e6..0000000000 --- a/gypfiles/gyp_v8 +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2012 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This script is wrapper for V8 that adds some support for how GYP -# is invoked by V8 beyond what can be done in the gclient hooks. - -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__)) -v8_root = os.path.abspath(os.path.join(script_dir, os.pardir)) - -sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib')) -import gyp - -# Add paths so that pymod_do_main(...) can import files. -sys.path.insert( - 1, os.path.abspath(os.path.join(v8_root, 'tools', 'generate_shim_headers'))) -sys.path.append( - os.path.abspath(os.path.join(v8_root, 'third_party', 'binutils'))) - -def GetOutputDirectory(): - """Returns the output directory that GYP will use.""" - - # Handle command line generator flags. - parser = argparse.ArgumentParser() - parser.add_argument('-G', dest='genflags', default=[], action='append') - genflags = parser.parse_known_args()[0].genflags - - # Handle generator flags from the environment. - genflags += shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', '')) - - needle = 'output_dir=' - for item in genflags: - if item.startswith(needle): - return item[len(needle):] - - return 'out' - - -def additional_include_files(args=[]): - """ - Returns a list of additional (.gypi) files to include, without - duplicating ones that are already specified on the command line. - """ - # Determine the include files specified on the command line. - # This doesn't cover all the different option formats you can use, - # but it's mainly intended to avoid duplicating flags on the automatic - # makefile regeneration which only uses this format. - specified_includes = set() - for arg in args: - if arg.startswith('-I') and len(arg) > 2: - specified_includes.add(os.path.realpath(arg[2:])) - - result = [] - def AddInclude(path): - if os.path.realpath(path) not in specified_includes: - result.append(path) - - # Always include standalone.gypi - AddInclude(os.path.join(v8_root, 'gypfiles', 'standalone.gypi')) - - # Optionally add supplemental .gypi files if present. - supplements = glob.glob(os.path.join(v8_root, '*', 'supplement.gypi')) - for supplement in supplements: - AddInclude(supplement) - - return result - - -def run_gyp(args): - if gyp.main(args) != 0: - print 'Error running GYP' - sys.exit(rc) - - -if __name__ == '__main__': - args = sys.argv[1:] - - gyp_chromium_no_action = os.environ.get('GYP_CHROMIUM_NO_ACTION') - if gyp_chromium_no_action == '1': - print 'Skipping gyp_v8 due to GYP_CHROMIUM_NO_ACTION env var.' - sys.exit(0) - - running_as_hook = '--running-as-hook' - if running_as_hook in args and gyp_chromium_no_action != '0': - print 'GYP is now disabled by default in runhooks.\n' - print 'If you really want to run this, either run ' - print '`python gypfiles/gyp_v8` explicitly by hand ' - print 'or set the environment variable GYP_CHROMIUM_NO_ACTION=0.' - sys.exit(0) - - if running_as_hook in args: - args.remove(running_as_hook) - - gyp_environment.set_environment() - - # This could give false positives since it doesn't actually do real option - # parsing. Oh well. - gyp_file_specified = False - for arg in args: - if arg.endswith('.gyp'): - gyp_file_specified = True - break - - # If we didn't get a file, check an env var, and then fall back to - # assuming 'all.gyp' from the same directory as the script. - if not gyp_file_specified: - gyp_file = os.environ.get('V8_GYP_FILE') - if gyp_file: - # Note that V8_GYP_FILE values can't have backslashes as - # path separators even on Windows due to the use of shlex.split(). - args.extend(shlex.split(gyp_file)) - else: - args.append(os.path.join(script_dir, 'all.gyp')) - - args.extend(['-I' + i for i in additional_include_files(args)]) - - # There shouldn't be a circular dependency relationship between .gyp files - args.append('--no-circular-check') - - # Set the GYP DEPTH variable to the root of the V8 project. - args.append('--depth=' + os.path.relpath(v8_root)) - - # If V8_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check - # to enfore syntax checking. - syntax_check = os.environ.get('V8_GYP_SYNTAX_CHECK') - if syntax_check and int(syntax_check): - args.append('--check') - - print 'Updating projects from gyp files...' - sys.stdout.flush() - - # Generate for the architectures supported on the given platform. - gyp_args = list(args) - gyp_args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) - gyp_generators = os.environ.get('GYP_GENERATORS', '') - if platform.system() == 'Linux' and gyp_generators != 'ninja': - # Work around for crbug.com/331475. - for f in glob.glob(os.path.join(v8_root, 'out', 'Makefile.*')): - os.unlink(f) - # --generator-output defines where the Makefile goes. - gyp_args.append('--generator-output=out') - # -Goutput_dir defines where the build output goes, relative to the - # Makefile. Set it to . so that the build output doesn't end up in out/out. - gyp_args.append('-Goutput_dir=.') - - gyp_defines = os.environ.get('GYP_DEFINES', '') - - # Automatically turn on crosscompile support for platforms that need it. - if all(('ninja' in gyp_generators, - 'OS=android' in gyp_defines, - 'GYP_CROSSCOMPILE' not in os.environ)): - os.environ['GYP_CROSSCOMPILE'] = '1' - - run_gyp(gyp_args) diff --git a/gypfiles/gyp_v8.py b/gypfiles/gyp_v8.py deleted file mode 100644 index 462ee674ac..0000000000 --- a/gypfiles/gyp_v8.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is (possibly, depending on python version) imported by -# gyp_v8 when GYP_PARALLEL=1 and it creates sub-processes through the -# multiprocessing library. - -# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for imports -# that don't end in .py (and aren't directories with an __init__.py). This -# wrapper makes "import gyp_v8" work with those old versions and makes it -# possible to execute gyp_v8.py directly on Windows where the extension is -# useful. - -import os - -path = os.path.abspath(os.path.split(__file__)[0]) -execfile(os.path.join(path, 'gyp_v8')) diff --git a/gypfiles/inspector-test.gyp b/gypfiles/inspector-test.gyp deleted file mode 100644 index c8cc5561a4..0000000000 --- a/gypfiles/inspector-test.gyp +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'v8_code': 1, - }, - 'includes': ['toolchain.gypi', 'features.gypi'], - 'targets': [ - { - 'target_name': 'inspector-test', - 'type': 'executable', - 'dependencies': [ - 'v8.gyp:v8_libplatform', - 'v8.gyp:v8_libbase', - 'v8.gyp:v8', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - '../test/inspector/inspector-test.cc', - '../test/inspector/isolate-data.cc', - '../test/inspector/isolate-data.h', - '../test/inspector/task-runner.cc', - '../test/inspector/task-runner.h', - ], - 'conditions': [ - ['v8_enable_i18n_support==1', { - 'dependencies': [ - '<(icu_gyp_path):icui18n', - '<(icu_gyp_path):icuuc', - ], - }], - ], - }, - ], -} diff --git a/gypfiles/inspector.gyp b/gypfiles/inspector.gyp deleted file mode 100644 index c0b503d9ce..0000000000 --- a/gypfiles/inspector.gyp +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'protocol_path': '../third_party/inspector_protocol', - 'inspector_path': '../src/inspector', - }, - 'includes': [ - 'inspector.gypi', - '../third_party/inspector_protocol/inspector_protocol.gypi', - ], - 'targets': [ - { 'target_name': 'inspector_injected_script', - 'type': 'none', - 'toolsets': ['target'], - 'actions': [ - { - 'action_name': 'convert_js_to_cpp_char_array', - 'inputs': [ - '<(inspector_path)/build/xxd.py', - '<(inspector_injected_script_source)', - ], - 'outputs': [ - '<(inspector_generated_injected_script)', - ], - 'action': [ - 'python', - '<(inspector_path)/build/xxd.py', - 'InjectedScriptSource_js', - '<(inspector_path)/injected-script-source.js', - '<@(_outputs)' - ], - }, - ], - # Since this target generates header files, it needs to be a hard dependency. - 'hard_dependency': 1, - }, - { 'target_name': 'protocol_compatibility', - 'type': 'none', - 'toolsets': ['target'], - 'actions': [ - { - 'action_name': 'protocol_compatibility', - 'inputs': [ - '<(inspector_path)/js_protocol.json', - ], - 'outputs': [ - '<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp', - ], - 'action': [ - 'python', - '<(protocol_path)/CheckProtocolCompatibility.py', - '--stamp', '<@(_outputs)', - '<(inspector_path)/js_protocol.json', - ], - 'message': 'Generating inspector protocol sources from protocol json definition', - }, - ] - }, - { 'target_name': 'protocol_generated_sources', - 'type': 'none', - 'dependencies': [ 'protocol_compatibility' ], - 'toolsets': ['target'], - 'actions': [ - { - 'action_name': 'protocol_generated_sources', - 'inputs': [ - '<(inspector_path)/js_protocol.json', - '<(inspector_path)/inspector_protocol_config.json', - '<@(inspector_protocol_files)', - ], - 'outputs': [ - '<@(inspector_generated_sources)', - ], - 'action': [ - 'python', - '<(protocol_path)/CodeGenerator.py', - '--jinja_dir', '../third_party', - '--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector', - '--config', '<(inspector_path)/inspector_protocol_config.json', - ], - 'message': 'Generating inspector protocol sources from protocol json', - }, - ] - }, - ], -} diff --git a/gypfiles/inspector.gypi b/gypfiles/inspector.gypi deleted file mode 100644 index 00cbbfaecb..0000000000 --- a/gypfiles/inspector.gypi +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'inspector_generated_sources': [ - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.h', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.h', - '<(SHARED_INTERMEDIATE_DIR)/include/inspector/Debugger.h', - '<(SHARED_INTERMEDIATE_DIR)/include/inspector/Runtime.h', - '<(SHARED_INTERMEDIATE_DIR)/include/inspector/Schema.h', - ], - - 'inspector_injected_script_source': '../src/inspector/injected-script-source.js', - 'inspector_generated_injected_script': '<(SHARED_INTERMEDIATE_DIR)/src/inspector/injected-script-source.h', - - 'inspector_all_sources': [ - '<@(inspector_generated_sources)', - '<(inspector_generated_injected_script)', - '../include/v8-inspector.h', - '../include/v8-inspector-protocol.h', - '../src/inspector/injected-script.cc', - '../src/inspector/injected-script.h', - '../src/inspector/inspected-context.cc', - '../src/inspector/inspected-context.h', - '../src/inspector/remote-object-id.cc', - '../src/inspector/remote-object-id.h', - '../src/inspector/search-util.cc', - '../src/inspector/search-util.h', - '../src/inspector/string-16.cc', - '../src/inspector/string-16.h', - '../src/inspector/string-util.cc', - '../src/inspector/string-util.h', - '../src/inspector/test-interface.cc', - '../src/inspector/test-interface.h', - '../src/inspector/v8-console.cc', - '../src/inspector/v8-console.h', - '../src/inspector/v8-console-agent-impl.cc', - '../src/inspector/v8-console-agent-impl.h', - '../src/inspector/v8-console-message.cc', - '../src/inspector/v8-console-message.h', - '../src/inspector/v8-debugger.cc', - '../src/inspector/v8-debugger.h', - '../src/inspector/v8-debugger-agent-impl.cc', - '../src/inspector/v8-debugger-agent-impl.h', - '../src/inspector/v8-debugger-script.cc', - '../src/inspector/v8-debugger-script.h', - '../src/inspector/v8-function-call.cc', - '../src/inspector/v8-function-call.h', - '../src/inspector/v8-heap-profiler-agent-impl.cc', - '../src/inspector/v8-heap-profiler-agent-impl.h', - '../src/inspector/v8-injected-script-host.cc', - '../src/inspector/v8-injected-script-host.h', - '../src/inspector/v8-inspector-impl.cc', - '../src/inspector/v8-inspector-impl.h', - '../src/inspector/v8-inspector-session-impl.cc', - '../src/inspector/v8-inspector-session-impl.h', - '../src/inspector/v8-internal-value-type.cc', - '../src/inspector/v8-internal-value-type.h', - '../src/inspector/v8-profiler-agent-impl.cc', - '../src/inspector/v8-profiler-agent-impl.h', - '../src/inspector/v8-regex.cc', - '../src/inspector/v8-regex.h', - '../src/inspector/v8-runtime-agent-impl.cc', - '../src/inspector/v8-runtime-agent-impl.h', - '../src/inspector/v8-schema-agent-impl.cc', - '../src/inspector/v8-schema-agent-impl.h', - '../src/inspector/v8-stack-trace-impl.cc', - '../src/inspector/v8-stack-trace-impl.h', - '../src/inspector/v8-value-utils.cc', - '../src/inspector/v8-value-utils.h', - '../src/inspector/wasm-translation.cc', - '../src/inspector/wasm-translation.h', - ] - } -} diff --git a/gypfiles/mac/asan.gyp b/gypfiles/mac/asan.gyp deleted file mode 100644 index 3fc7f58d43..0000000000 --- a/gypfiles/mac/asan.gyp +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2015 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'asan_dynamic_runtime', - 'toolsets': ['target', 'host'], - 'type': 'none', - 'variables': { - # Every target is going to depend on asan_dynamic_runtime, so allow - # this one to depend on itself. - 'prune_self_dependency': 1, - # Path is relative to this GYP file. - 'asan_rtl_mask_path': - '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwin', - 'asan_osx_dynamic': - '<(asan_rtl_mask_path)/libclang_rt.asan_osx_dynamic.dylib', - }, - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '@ instead of @< to also see clang_warning_flags set in - # targets directly, not just the clang_warning_flags in target_defaults. - 'cflags': [ '>@(clang_warning_flags)' ], - 'cflags!': [ '>@(clang_warning_flags_unset)' ], - 'xcode_settings': { - 'WARNING_CFLAGS': ['>@(clang_warning_flags)'], - 'WARNING_CFLAGS!': ['>@(clang_warning_flags_unset)'], - }, - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ '>@(clang_warning_flags)' ], - 'AdditionalOptions!': [ '>@(clang_warning_flags_unset)' ], - }, - }, - }], - ['clang==0 and host_clang==1', { - 'target_conditions': [ - ['_toolset=="host"', { - 'cflags': [ '>@(clang_warning_flags)' ], - 'cflags!': [ '>@(clang_warning_flags_unset)' ], - }], - ], - }], - ], -} diff --git a/gypfiles/shim_headers.gypi b/gypfiles/shim_headers.gypi deleted file mode 100644 index 940211c240..0000000000 --- a/gypfiles/shim_headers.gypi +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is meant to be included into a target to handle shim headers -# in a consistent manner. To use this the following variables need to be -# defined: -# headers_root_path: string: path to directory containing headers -# header_filenames: list: list of header file names - -{ - 'variables': { - 'shim_headers_path': '<(SHARED_INTERMEDIATE_DIR)/shim_headers/<(_target_name)/<(_toolset)', - 'shim_generator_additional_args%': [], - }, - 'include_dirs++': [ - '<(shim_headers_path)', - ], - 'all_dependent_settings': { - 'include_dirs+++': [ - '<(shim_headers_path)', - ], - }, - 'actions': [ - { - 'variables': { - 'generator_path': '<(DEPTH)/tools/generate_shim_headers/generate_shim_headers.py', - 'generator_args': [ - '--headers-root', '<(headers_root_path)', - '--output-directory', '<(shim_headers_path)', - '<@(shim_generator_additional_args)', - '<@(header_filenames)', - ], - }, - 'action_name': 'generate_<(_target_name)_shim_headers', - 'inputs': [ - '<(generator_path)', - ], - 'outputs': [ - '> sys.stderr, 'Expecting gn outdir in %s...' % gn_out_dir - gn = Run('ninja -C %s -t commands %s' % (gn_out_dir, sys.argv[3])) - if sys.platform == 'win32': - # On Windows flags are stored in .rsp files which are created during build. - print >> sys.stderr, 'Building in %s...' % gn_out_dir - Run('ninja -C %s -d keeprsp %s' % (gn_out_dir, sys.argv[3])) - - gyp_out_dir = sys.argv[2] - print >> sys.stderr, 'Expecting gyp outdir in %s...' % gyp_out_dir - gyp = Run('ninja -C %s -t commands %s' % (gyp_out_dir, " ".join(sys.argv[4:]))) - if sys.platform == 'win32': - # On Windows flags are stored in .rsp files which are created during build. - print >> sys.stderr, 'Building in %s...' % gyp_out_dir - Run('ninja -C %s -d keeprsp %s' % (gyp_out_dir, " ".join(sys.argv[4:]))) - - all_gyp_flags = GetFlags(gyp.splitlines(), - os.path.join(os.getcwd(), gyp_out_dir)) - all_gn_flags = GetFlags(gn.splitlines(), - os.path.join(os.getcwd(), gn_out_dir)) - gyp_files = set(all_gyp_flags.keys()) - gn_files = set(all_gn_flags.keys()) - different_source_list = gyp_files != gn_files - if different_source_list: - print 'Different set of sources files:' - print ' In gyp, not in GN:\n %s' % '\n '.join( - sorted(gyp_files - gn_files)) - print ' In GN, not in gyp:\n %s' % '\n '.join( - sorted(gn_files - gyp_files)) - print '\nNote that flags will only be compared for files in both sets.\n' - file_list = gyp_files & gn_files - files_with_given_differences = {} - for filename in sorted(file_list): - gyp_flags = all_gyp_flags[filename] - gn_flags = all_gn_flags[filename] - differences = CompareLists(gyp_flags, gn_flags, 'dash_f') - differences += CompareLists(gyp_flags, gn_flags, 'defines') - differences += CompareLists(gyp_flags, gn_flags, 'include_dirs', - ['-I%s' % os.path.dirname(BASE_DIR)]) - differences += CompareLists(gyp_flags, gn_flags, 'warnings', - # More conservative warnings in GN we consider to be OK. - dont_care_gyp=[ - '/wd4091', # 'keyword' : ignored on left of 'type' when no variable - # is declared. - '/wd4456', # Declaration hides previous local declaration. - '/wd4457', # Declaration hides function parameter. - '/wd4458', # Declaration hides class member. - '/wd4459', # Declaration hides global declaration. - '/wd4702', # Unreachable code. - '/wd4800', # Forcing value to bool 'true' or 'false'. - '/wd4838', # Conversion from 'type' to 'type' requires a narrowing - # conversion. - ] if sys.platform == 'win32' else None, - dont_care_gn=[ - '-Wendif-labels', - '-Wextra', - '-Wsign-compare', - ] if not sys.platform == 'win32' else None) - differences += CompareLists(gyp_flags, gn_flags, 'other') - if differences: - files_with_given_differences.setdefault(differences, []).append(filename) - - for diff, files in files_with_given_differences.iteritems(): - print '\n'.join(sorted(files)) - print diff - - print 'Total differences:', g_total_differences - # TODO(scottmg): Return failure on difference once we're closer to identical. - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/tools/mingw-generate-makefiles.sh b/tools/mingw-generate-makefiles.sh deleted file mode 100755 index 67715fc15b..0000000000 --- a/tools/mingw-generate-makefiles.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Monkey-patch GYP. -cat > tools/gyp/gyp.mingw << EOF -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -# TODO(mark): sys.path manipulation is some temporary testing stuff. -try: - import gyp -except ImportError, e: - import os.path - sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) - import gyp - -def MonkeyBuildFileTargets(target_list, build_file): - """From a target_list, returns the subset from the specified build_file. - """ - build_file = build_file.replace('/', '\\\\') - return [p for p in target_list if gyp.common.BuildFile(p) == build_file] -gyp.common.BuildFileTargets = MonkeyBuildFileTargets - -import gyp.generator.make -import os -def Monkey_ITIP(self): - """Returns the location of the final output for an installable target.""" - sep = os.path.sep - # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files - # rely on this. Emulate this behavior for mac. - if (self.type == 'shared_library' and - (self.flavor != 'mac' or self.toolset != 'target')): - # Install all shared libs into a common directory (per toolset) for - # convenient access with LD_LIBRARY_PATH. - return '\$(builddir)%slib.%s%s%s' % (sep, self.toolset, sep, self.alias) - return '\$(builddir)' + sep + self.alias -gyp.generator.make.MakefileWriter._InstallableTargetInstallPath = Monkey_ITIP - -if __name__ == '__main__': - sys.exit(gyp.main(sys.argv[1:])) -EOF - -# Delete old generated Makefiles. -find out -name '*.mk' -or -name 'Makefile*' -exec rm {} \; - -# Generate fresh Makefiles. -mv tools/gyp/gyp tools/gyp/gyp.original -mv tools/gyp/gyp.mingw tools/gyp/gyp -make out/Makefile.ia32 -mv tools/gyp/gyp tools/gyp/gyp.mingw -mv tools/gyp/gyp.original tools/gyp/gyp - -# Patch generated Makefiles: replace most backslashes with forward slashes, -# fix library names in linker flags. -FILES=$(find out -name '*.mk' -or -name 'Makefile*') -for F in $FILES ; do - echo "Patching $F..." - cp $F $F.orig - cat $F.orig \ - | sed -e 's|\([)a-zA-Z0-9]\)\\\([a-zA-Z]\)|\1/\2|g' \ - -e 's|\([)a-zA-Z0-9]\)\\\\\([a-zA-Z]\)|\1/\2|g' \ - -e 's|'%s/n'|'%s\\\\n'|g' \ - -e 's|-lwinmm\.lib|-lwinmm|g' \ - -e 's|-lws2_32\.lib|-lws2_32|g' \ - > $F - rm $F.orig -done diff --git a/tools/node/update_node.py b/tools/node/update_node.py index ebd953a903..5d7e4daff4 100755 --- a/tools/node/update_node.py +++ b/tools/node/update_node.py @@ -54,6 +54,9 @@ ADD_TO_GITIGNORE = [ "/testing/gtest/*", "!/third_party/jinja2", "!/third_party/markupsafe" ] +# Node.js owns deps/v8/gypfiles in their downstream repository. +FILES_TO_KEEP = [ "gypfiles" ] + def RunGclient(path): assert os.path.isdir(path) print ">> Running gclient sync" @@ -73,7 +76,7 @@ def CommitPatch(options): cwd=options.v8_path, ) -def UpdateTarget(repository, options): +def UpdateTarget(repository, options, files_to_keep): source = os.path.join(options.v8_path, *repository) target = os.path.join(options.node_path, TARGET_SUBDIR, *repository) print ">> Updating target directory %s" % target @@ -83,16 +86,24 @@ def UpdateTarget(repository, options): # Remove possible remnants of previous incomplete runs. node_common.UninitGit(target) - git_commands = [ - ["git", "init"], # initialize target repo - ["git", "remote", "add", "origin", source], # point to the source repo - ["git", "fetch", "origin", "HEAD"], # sync to the current branch - ["git", "reset", "--hard", "FETCH_HEAD"], # reset to the current branch - ["git", "clean", "-fd"], # delete removed files - ] + git_args = [] + git_args.append(["init"]) # initialize target repo + + if files_to_keep: + git_args.append(["add"] + files_to_keep) # add and commit + git_args.append(["commit", "-m", "keep files"]) # files we want to keep + + git_args.append(["remote", "add", "source", source]) # point to source repo + git_args.append(["fetch", "source", "HEAD"]) # sync to current branch + git_args.append(["checkout", "-f", "FETCH_HEAD"]) # switch to that branch + git_args.append(["clean", "-fd"]) # delete removed files + + if files_to_keep: + git_args.append(["cherry-pick", "master"]) # restore kept files + try: - for command in git_commands: - subprocess.check_call(command, cwd=target) + for args in git_args: + subprocess.check_call(["git"] + args, cwd=target) except: raise finally: @@ -155,11 +166,11 @@ def Main(args): if options.with_patch: CommitPatch(options) # Update main V8 repository. - UpdateTarget([""], options) + UpdateTarget([""], options, FILES_TO_KEEP) # Patch .gitignore before updating sub-repositories. UpdateGitIgnore(options) for repo in SUB_REPOSITORIES: - UpdateTarget(repo, options) + UpdateTarget(repo, options, None) if options.commit: CreateCommit(options) diff --git a/tools/presubmit.py b/tools/presubmit.py index 97b3700c44..917b6e2383 100755 --- a/tools/presubmit.py +++ b/tools/presubmit.py @@ -281,8 +281,7 @@ class SourceProcessor(SourceFileProcessor): Check that all files include a copyright notice and no trailing whitespaces. """ - RELEVANT_EXTENSIONS = ['.js', '.cc', '.h', '.py', '.c', - '.status', '.gyp', '.gypi'] + RELEVANT_EXTENSIONS = ['.js', '.cc', '.h', '.py', '.c', '.status'] def __init__(self): self.runtime_function_call_pattern = self.CreateRuntimeFunctionCallMatcher() @@ -332,7 +331,7 @@ class SourceProcessor(SourceFileProcessor): def IgnoreDir(self, name): return (super(SourceProcessor, self).IgnoreDir(name) or - name in ('third_party', 'gyp', 'out', 'obj', 'DerivedSources')) + name in ('third_party', 'out', 'obj', 'DerivedSources')) IGNORE_COPYRIGHTS = ['box2d.js', 'cpplint.py',