From dda2889ba1211c5e6e5b69dca3286fe1dc7f6ff8 Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Thu, 25 Aug 2011 14:50:09 +0000 Subject: [PATCH] Refactor .gyp files: common.gypi now contains global target defaults and is included by all .gyp files; standalone.gypi contains definitions for stand-alone v8 builds. This fixes d8 for the ARM simulator. TEST=compiles and tests pass on all platforms Review URL: http://codereview.chromium.org/7740020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- Makefile | 9 +- build/common.gypi | 365 +++++++++++++++++++-------------- build/gyp_v8 | 4 +- build/standalone.gypi | 197 ++++++++++++++++++ build/v8-features.gypi | 132 ------------ preparser/preparser.gyp | 1 + samples/samples.gyp | 1 + src/d8.gyp | 2 + test/cctest/cctest.gyp | 2 +- tools/gyp/v8.gyp | 281 +------------------------ tools/test-wrapper-gypbuild.py | 1 + 11 files changed, 428 insertions(+), 567 deletions(-) create mode 100644 build/standalone.gypi delete mode 100644 build/v8-features.gypi diff --git a/Makefile b/Makefile index 85a8f6f1f..489210f05 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ ARCHES = ia32 x64 arm MODES = release debug # List of files that trigger Makefile regeneration: -GYPFILES = build/all.gyp build/common.gypi build/v8-features.gypi \ +GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \ preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ test/cctest/cctest.gyp tools/gyp/v8.gyp @@ -90,21 +90,22 @@ $(addsuffix .clean,$(ARCHES)): rm -f $(OUTDIR)/Makefile-$(basename $@) rm -rf $(OUTDIR)/$(basename $@).release rm -rf $(OUTDIR)/$(basename $@).debug + find $(OUTDIR) -regex '.*\(host\|target\)-$(basename $@)\.mk' -delete clean: $(addsuffix .clean,$(ARCHES)) # GYP file generation targets. $(OUTDIR)/Makefile-ia32: $(GYPFILES) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ - -Ibuild/common.gypi --depth=. -Dtarget_arch=ia32 -S-ia32 \ + -Ibuild/standalone.gypi --depth=. -Dtarget_arch=ia32 -S-ia32 \ $(GYPFLAGS) $(OUTDIR)/Makefile-x64: $(GYPFILES) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ - -Ibuild/common.gypi --depth=. -Dtarget_arch=x64 -S-x64 \ + -Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 -S-x64 \ $(GYPFLAGS) $(OUTDIR)/Makefile-arm: $(GYPFILES) build/armu.gypi build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ - -Ibuild/common.gypi --depth=. -Ibuild/armu.gypi -S-arm \ + -Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi -S-arm \ $(GYPFLAGS) diff --git a/build/common.gypi b/build/common.gypi index c41b2b2b6..6d374a654 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -25,184 +25,247 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Shared definitions for all V8-related targets. + { 'variables': { - 'library%': 'static_library', - 'component%': 'static_library', - 'visibility%': 'hidden', - 'msvs_multi_core_compile%': '1', - 'variables': { - 'variables': { - 'conditions': [ - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { - # This handles the Linux platforms we generally deal with. Anything - # else gets passed through, which probably won't work very well; such - # hosts should pass an explicit target_arch to gyp. - 'host_arch%': - '>> running tests for %s.%s" % (arch, mode) shell = workspace + '/' + options.outdir + '/' + arch + '.' + mode + "/d8" child = subprocess.Popen(' '.join(args_for_children + + ['--arch=' + arch] + ['--mode=' + mode] + ['--shell=' + shell]), shell=True, -- 2.34.1