From c8fa0f0c4bf0cc8e3d7fec68a9facfc0750f6e54 Mon Sep 17 00:00:00 2001 From: Peter Olsson Date: Sun, 23 Mar 2014 09:25:41 +0100 Subject: [PATCH] mod_v8: Use parallel build by default. Use configure flag "--disable-parallel-build-v8" to disable it. It's disabled by default for Debian build scripts, since parallel build has some issues with cowbuilder. --- configure.ac | 5 +++++ debian/rules | 2 +- src/mod/languages/mod_v8/Makefile.am | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d161bdbdc5..183a23b34f 100644 --- a/configure.ac +++ b/configure.ac @@ -1112,6 +1112,11 @@ AC_ARG_ENABLE(static-v8, [AS_HELP_STRING([--enable-static-v8], [Statically link V8 into mod_v8])], [enable_static_v8="$enableval"], [enable_static_v8="no"]) AM_CONDITIONAL([ENABLE_STATIC_V8],[test "x$enable_static_v8" != "xno"]) +# Option to disable parallel build of Google's V8 +AC_ARG_ENABLE(parallel-build-v8, +[AS_HELP_STRING([--disable-parallel-build-v8], [Disable parallel build of V8])], [enable_parallel_build_v8="$enableval"], [enable_parallel_build_v8="yes"]) +AM_CONDITIONAL([ENABLE_PARALLEL_BUILD_V8],[test "x$enable_parallel_build_v8" != "xno"]) + AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"]) AM_CONDITIONAL([HAVE_LIBEDIT],[test "x$enable_core_libedit_support" != "xno"]) AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"]) diff --git a/debian/rules b/debian/rules index bb392b67f8..398226139f 100755 --- a/debian/rules +++ b/debian/rules @@ -84,7 +84,7 @@ override_dh_auto_clean: --with-certsdir=/etc/freeswitch/tls \ --with-scriptdir=/usr/share/freeswitch/scripts \ --with-recordingsdir=/var/lib/freeswitch/recordings \ - --enable-static-v8 + --enable-static-v8 --disable-parallel-build-v8 touch $@ override_dh_auto_configure: .stamp-configure diff --git a/src/mod/languages/mod_v8/Makefile.am b/src/mod/languages/mod_v8/Makefile.am index 61c01650c5..69ad7ea49e 100644 --- a/src/mod/languages/mod_v8/Makefile.am +++ b/src/mod/languages/mod_v8/Makefile.am @@ -40,6 +40,12 @@ V8_BUILDPARAMS += library=shared V8LIB=$(V8_LIBDIR)/libv8.$(V8_LIBEXT) endif +if ENABLE_PARALLEL_BUILD_V8 +V8_EXTRA_BUILD_PARAMS= +else +V8_EXTRA_BUILD_PARAMS=--no-parallel +endif + # Try to find the target platform for our configured CXX compiler # Parse the result one extra time to handle different i386 platforms (i386, i486 etc) CXX_TARGET_PLATFORM := $(shell $(CXX) -v 2>&1 | grep Target | cut '-d:' -f2 | cut '-d-' -f1 | tr -d ' ') @@ -127,7 +133,7 @@ $(V8LIB): $(V8_DIR) $(V8_DIR)/.stamp-patch fi; \ fi; \ cd $(V8_BUILDDIR) && CFLAGS="$(V8_CXXFLAGS)" CXXFLAGS="$(V8_CXXFLAGS)" \ - LINK=@CXX@ CXX=@CXX@ GYPFLAGS="--no-parallel" GYP_DEFINES="$$defines" \ + LINK=@CXX@ CXX=@CXX@ GYPFLAGS="$(V8_EXTRA_BUILD_PARAMS)" GYP_DEFINES="$$defines" \ OUTDIR=$(V8_BUILDDIR)/out \ PYTHONPATH="$(V8_DIR)/build/gyp/pylib:$(PYTHONPATH)" $(MAKE) -C $(V8_DIR) $(V8_BUILDPARAMS) native