From df73977d8acfb36b27c31e51fe047568969924d2 Mon Sep 17 00:00:00 2001 From: Martin Elshuber Date: Tue, 19 Jun 2018 12:08:10 +0200 Subject: Add README.md --- README.md | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000000..738f06504fb --- /dev/null +++ b/README.md @@ -0,0 +1,143 @@ +# Ampere Computing LLVM Release Notes + +These are the release notes the Ampere Computing LLVM release + +# Build Instructions + +This section depicts the commands used top build the release + +## Setup the Source + +### Setup envirionment + +Select a build version and select the envirionment variables according to section [Build Tags](#buildtags) in section below + +### Clone and Checkout the LLVM base rpository (modify `LLVMREPOSITORY` accordingly) + +``` +export LLVMREPOSITORY=git@gitlab.lan:armv8 +git clone $LLVMREPOSITORY/llvm.git llvm +cd llvm +git checkout $LLVMRELEASETAG +``` + +### Clone and Chekout the remaining repositories + +``` +pushd projects +git clone https://git.llvm.org/git/compiler-rt.git compiler-rt +cd compiler-rt +git checkout $LLVMCOMPILERRTTAG +cd .. +git clone https://git.llvm.org/git/libcxx.git libcxx +cd libcxx +git checkout $LLVMLIBCXXTAG +cd .. +git clone https://git.llvm.org/git/libcxxabi.git libcxxabi +cd libcxxabi +git checkout $LLVMLIBCXXABITAG +popd +pushd tools +git clone $LLVMREPOSITORY/clang.git clang +cd clang +git checkout $LLVMRELEASETAG +popd +``` + +#### [optional] Only checkout the correct tags from existing checkout + +If you alreade have cloned the repos you can use the following commands to update to a defferent release + +``` +git fetch +git checkout $LLVMRELEASETAG +pushd projects +cd compiler-rt +git fetch +git checkout $LLVMCOMPILERRTTAG +cd .. +cd libcxx +git fetch +git checkout $LLVMLIBCXXTAG +cd .. +cd libcxxabi +git fetch +git checkout $LLVMLIBCXXABITAG +popd +pushd tools +cd clang +git fetch +git checkout $LLVMRELEASETAG +popd +``` + +## Build the source + +Follow the instructions below to build the LLVM and libraries + +### Build LLVM + +You might want to adjust the variable `BUILDDIR` and `INSTALL_DIR` for your build + +``` +export BUILDDIR=build +export INSTALL_DIR=/compilers/llvm/$LLVMRELEASETAG +export LLVMSRC=$(pwd) +mkdir -p $BUILDDIR +pushd $BUILDDIR +cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_BINUTILS_INCDIR=/usr/include \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ + -DLLVM_TARGETS_TO_BUILD="AArch64" \ + $LLVMSRC +make -j $(($(nproc)*2)) +make -j $(($(nproc)*2)) install +popd +``` + +## Build tcmalloc + +``` +git clone https://github.com/gperftools/gperftools.git +cd gperftools +git checkout $PERFTOOLSTAG +./autogen.sh +export BUILDDIR=build +export BUILDSRC=$(pwd) +export INSTALL_DIR=/compilers/llvm/$LLVMRELEASETAG +mkdir -p $BUILDDIR +pushd $BUILDDIR +export CC="$INSTALL_DIR/bin/clang -mtune=xgene" +export CXX="$INSTALL_DIR/bin/clang++ -mtune=xgene" +export CPP="$INSTALL_DIR/bin/clang-cpp -mtune=xgene" +export CXXXPP="$INSTALL_DIR/bin/clang-cpp -mtune=xgene" +$BUILDSRC/configure --prefix=$INSTALL_DIR --with-tcmalloc-pagesize=32 --enable-static +make -j $(($(nproc)*2)) +make -j $(($(nproc)*2)) install +popd +``` + +# Using llvm + +In order to use llvm follow the instructions on llvm.org. In order to +use the exgene processor model add the option `-mtune=xgene`. + +# Build Tags + +## Envirionment for llvm_60-amp-20180630 + +``` +export LLVMRELEASETAG=llvm_60-amp-20180630 +export LLVMCOMPILERRTTAG=9d61c78bced84866cc886f1f1111c8e51c1d52d5 +export LLVMLIBCXXTAG=48a89ecb9fd90f403ad8a7b061ff1bb18f34e132 +export LLVMLIBCXXABITAG=9245d481eb3e890f708ff2d7dadf2a10c04748ba +export PERFTOOLSTAG=f47a52ce85c3d8d559aaae7b7a426c359fbca225 +``` + +# Testing + +The following test have been executed: + +* SPEC2006 Int: Score 399 +* make check -- cgit v1.2.3