The new script ./build-compiler-5.0.1.sh will package an archive named compiler.tar.gz for both MacOS and Linux when executed in a Linux environment. This archive currently contains the clang compiler and the C standard library, which is sufficient to compile the python_dist() test project -- this can be tested by running ./pants run testprojects/src/python/python_distribution/fasthello_with_install_requires:main_with_no_conflict.
Notes
This script pulls down a binary release of clang+llvm from the llvm downloads page for MacOS, but we have to build the Linux package from a source release (downloaded from the same page). This means that the script should be executed in a Linux environment to produce both MacOS and Linux packages.
LLVM really likes .tar.xz files for some reason, so xz is needed to unpack their archives -- you will need to run yum install -y xz if using the CentOS Dockerfile available in the pants codebase.
This script executes the build-cmake-3.9.5.sh script already available in this repo to produce a cmake binary that can be used to build LLVM from source. This is necessary because LLVM requires cmake >= 3.4, which is otherwise not available in the CentOS Dockerfile from the pants codebase. Because build-cmake-3.9.5.sh only builds for Linux x86_64, this script only builds a compiler for 64-bit Linux hosts. If 32-bit support becomes necessary, I can probably modify both scripts to do so, but I haven't investigated whether this is supported for either cmake or LLVM yet.
The new script
./build-compiler-5.0.1.sh
will package an archive namedcompiler.tar.gz
for both MacOS and Linux when executed in a Linux environment. This archive currently contains the clang compiler and the C standard library, which is sufficient to compile thepython_dist()
test project -- this can be tested by running./pants run testprojects/src/python/python_distribution/fasthello_with_install_requires:main_with_no_conflict
.Notes
.tar.xz
files for some reason, soxz
is needed to unpack their archives -- you will need to runyum install -y xz
if using the CentOS Dockerfile available in the pants codebase.build-cmake-3.9.5.sh
script already available in this repo to produce a cmake binary that can be used to build LLVM from source. This is necessary because LLVM requires cmake >= 3.4, which is otherwise not available in the CentOS Dockerfile from the pants codebase. Becausebuild-cmake-3.9.5.sh
only builds for Linux x86_64, this script only builds a compiler for 64-bit Linux hosts. If 32-bit support becomes necessary, I can probably modify both scripts to do so, but I haven't investigated whether this is supported for either cmake or LLVM yet.