From ccac00001287b9bca11813bb262afc7702c7dce2 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 31 Jul 2013 15:12:19 +0200 Subject: Increase stack size for Web UI builder Web UI build fails on some architectures or configuration due to StackOverflow. This patch increases the stack size to solve it. 512k is usually enough but we encountered fail on ppc64 even with 2m, therefore the 8m. The build is single threaded so it shouldn't waste much memory. --- install/ui/util/uglifyjs/uglify | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'install/ui/util/uglifyjs') diff --git a/install/ui/util/uglifyjs/uglify b/install/ui/util/uglifyjs/uglify index 7d25b38d..1227f589 100755 --- a/install/ui/util/uglifyjs/uglify +++ b/install/ui/util/uglifyjs/uglify @@ -25,8 +25,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # rhino-1.7R4 doesn't have -main option to enable CommonJS support. It was # replaced by -require option. -if [ `rhino --help | grep -e -require | wc -l` -gt 0 ] ; then - rhino -require $DIR/uglify-js.js $@ +RHINO="java -Xss${JAVA_STACK_SIZE:-512k} -classpath /usr/share/java/rhino.jar org.mozilla.javascript.tools.shell.Main" +if [ `$RHINO --help | grep -e -require | wc -l` -gt 0 ] ; then + $RHINO -require $DIR/uglify-js.js $@ else - rhino -main $DIR/uglify-js.js $DIR/ug.js $@ -fi \ No newline at end of file + $RHINO -main $DIR/uglify-js.js $DIR/ug.js $@ +fi -- cgit