Help needed about setting up an Aarch64 LLVM buildbot

Dear LLVM developers,

My name is Gabor Ballabas. I work for the University of Szeged (Hungary) and
we have an ongoing project with the goal of setting up and maintaining an LLVM buildbot
for the ARMv8 - alias Aarch64 - architecture. Due to lack of existing hardware for this
architecture we use ARM’s Foundation Model to run the Aarch64 binaries.
(See: )

The buildbot works as follows:

  • The buildslave runs on an x86 machine cross-compiling LLVM itself to aarch64-linux-gnu
    host and target.
  • The buildslave’s build directory is mirrored via NFS to a running instance of ARM’s Foundation
  • The buildslave logs into the Foundation Model via ssh and runs the regression tests.

Unfortunately there has been some issues with the buildbot. I checked out the zorg repository
and modified it in order to use it on my local machine (turning off all the other builders and the mail
and irc status etc.). You can check it at this link:

The problem is that the buildslave uses the following options to the configure script:

–host=aarch64-linux-gnu --target=aarch64-linux-gnu etc.

After that the make command fails with this message:

llvm[0]: Constructing LLVMBuild project information.
configure: error: Already configured in /home/ximinez/work/llvm/source/llvm
make[1]: Entering directory /home/ximinez/work/llvm/source/llvm/BuildTools'</small> <small>make[1]: *** No targets specified and no makefile found. Stop.</small> <small>make[1]: Leaving directory /home/ximinez/work/llvm/source/llvm/BuildTools’
make: *** [cross-compile-build-tools] Error 1

I found the same problem mentioned on the internet with the suggested solution that a
separate build directory must be used in order to avoid this failure when cross-compiling LLVM.
But for that I had to modify the script - see the attachment.

My question is: Is there any other way to solve this problem without modifying
Maybe I’m not using the configure script or the zorg scripts correctly. Or maybe there is a simple,
clean way to accomplish this task that I failed to notice.

Best regards,
Gabor Ballabas

llvmbuilder.diff (2.25 KB)