summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Elshuber <martin.elshuber@theobroma-systems.com>2018-06-19 12:08:10 +0200
committerMartin Elshuber <martin.elshuber@theobroma-systems.com>2018-11-30 14:01:32 +0100
commit023a3647a66e350ae8a47cdc2e944c382cec2841 (patch)
tree2f55cbacb919375c95ea0b3040a4a647aa9dbcc5
parentb4653e4162468cdd4a202481c2d1a10f5b9a5f1d (diff)
Add README.md
-rw-r--r--README.md143
1 files changed, 143 insertions, 0 deletions
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`.
+
+# <a name="buildtags"></a> 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