Clang UPC Installation
1.1. Requirements
Clang UPC is know to work on the following platforms (with LInux/x86_64 being the main development and test platform):
OS | Architecture |
Linux | x86_64/amd64 |
Linux | x86 |
Linux | PowerPC |
FreeBSD | x86_64 |
Mac OS X | x86_64 |
Building Clang UPC requires CMake
or GNU Autoconf
tools (configure). Please see the LLVM
documentation
for a list of any further system requirements.
1.2 Downloading Sources
Clang UPC sources are managed in the git repositories on GitHub. At minimum, two repositories (llvm-upc and clang-upc) must be acquired (cloned). For example, if src is a directory for Clang UPC source, the following commands can be used to clone Clang UPC sources:
git clone git://github.com/Intrepid/llvm-upc.git src cd src/tools; git clone git://github.com/Intrepid/clang-upc.git clang
Optionally you can also choose to install Clang based UPC to C translator:
cd src/tools/clang/tools; \ git clone git://github.com/Intrepid/upc2c upc2c
The maintainer of Clang UPC also provides stable releases of the Clang UPC. Please visit the download page for the list of available downloads.
1.3 Configure and Build Sources
Follow these simple steps to configure Clang UPC:
- By using cmake:
-
mkdir bld; cd bld; cmake [options] path/to/src
- By using configure:
-
mkdir bld; cd bld; path/to/src/configure [options]
NOTE: bld is a directory that holds the intermediate build products. The bld directory needs to be outside of the llvm source tree, but other than that, it’s arbitrary.
One of the common configuration options is directory prefix of the installed compiler. For example, cmake prefix option:
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local
And configure prefix option:
--prefix=/usr/local
Run make in the build directory to create Clang UPC executables and libraries, and install the compiler in the desired place (by default /usr/local).
make; make install
Note: Adding make option for parallel build (e.g. make -j8) speeds up the build process.
Please see the configuration options for more configuration options.