summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-03-26 00:01:22 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-03-26 00:04:53 +0200
commitd4fd4c3a7bde4bcb12f4973b1ab1548aeb8030fd (patch)
treee029cfd64ec5e8075ac5ea33bf803db3ade12323 /gnu
parent7240b4a989ef9be2fba518666c6213d2eabac394 (diff)
downloadguix-d4fd4c3a7bde4bcb12f4973b1ab1548aeb8030fd.tar.gz
gnu: ant-bootstrap: Make build more reliable.
* gnu/packages/java.scm (ant-bootstrap)[arguments]: Remove bootstrap phase;
create HOME/.ant.properties; pass options to JamVM.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/java.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 9c5566f819..3293f27546 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -212,6 +212,7 @@ JNI.")
      `(#:tests? #f ; no "check" target
        #:phases
        (modify-phases %standard-phases
+         (delete 'bootstrap)
          (delete 'configure)
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
@@ -226,6 +227,11 @@ JNI.")
                      (string-append (assoc-ref inputs "jamvm")
                                     "/lib/rt.jar"))
 
+             ;; Ant complains if this file doesn't exist.
+             (setenv "HOME" "/tmp")
+             (with-output-to-file "/tmp/.ant.properties"
+               (lambda _ (display "")))
+
              ;; Use jikes instead of javac for <javac ...> tags in build.xml
              (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
 
@@ -233,6 +239,11 @@ JNI.")
              ;; interesting, so we silence them.
              (setenv "$BOOTJAVAC_OPTS" "-nowarn")
 
+             ;; Without these JamVM options the build may freeze.
+             (substitute* "bootstrap.sh"
+               (("^\"\\$\\{JAVACMD\\}\" " m)
+                (string-append m "-Xnocompact -Xnoinlining ")))
+
              ;; Disable tests because we are bootstrapping and thus don't have
              ;; any of the dependencies required to build and run the tests.
              (substitute* "build.xml"