Skip to content
Snippets Groups Projects
Commit 6e24c7a9 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Merge branch 'hpvm-reorg-9-installer' into hpvm-reorg-9

parents ff38ccc5 36195593
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,12 @@ URL="http://releases.llvm.org"
WGET=wget
CURRENT_DIR=`pwd`
INSTALL_DIR=`pwd`/install
BUILD_DIR=$CURRENT_DIR/$LLVM_SRC/build
NUM_THREADS=16
# Using 2 threads by default
NUM_THREADS=2
SUFFIX=".tar.xz"
CLANG_SRC="cfe-$VERSION.src"
......@@ -19,11 +19,7 @@ LLVM_SRC="llvm-$VERSION.src"
RT_SRC="compiler-rt-$VERSION.src"
LIBCXX_SRC="libcxx-$VERSION.src"
LIBCXXABI_SRC="libcxxabi-$VERSION.src"
LLDB_SRC="lldb-$VERSION.src"
LLD_SRC="lld-$VERSION.src"
POLLY_SRC="polly-$VERSION.src"
OPENMP_SRC="openmp-$VERSION.src"
CLANG_TOOLS_SRC="clang-tools-extra-$VERSION.src"
if [ -d $LLVM_SRC ]; then
......@@ -146,6 +142,7 @@ if [ $LLD_SRC != "" ]; then
fi
HPVM_DIR=$CURRENT_DIR/$LLVM_SRC/tools/hpvm
if [ ! -d $HPVM_DIR ]; then
echo Adding HPVM sources to tree
mkdir -p $HPVM_DIR
......@@ -166,11 +163,44 @@ cd $CURRENT_DIR/llvm_patches
/bin/bash ./apply_patch.sh
echo Patches applied.
echo
AUTOMATE="y"
read -n 1 -p "Build and install HPVM automatically? (y or n): " AUTOMATE
if [ ! $AUTOMATE == "y" ]; then
echo
echo HPMV not installed. Exiting.
exit
fi
echo
echo
read -n 2 -p "Number of threads: " NUM_THREADS
if [ ! $NUM_THREADS -gt 0 ]; then
NUM_THREADS = 2
echo
echo Using $NUM_THREADS threads by default.
fi
echo
echo Now building...
mkdir -p $BUILD_DIR
mkdir -p $INSTALL_DIR
echo Using $NUM_THREADS threads to build HPVM.
echo
cd $CURRENT_DIR
if [ ! -d $BUILD_DIR ]; then
mkdir -p $BUILD_DIR
fi
if [ ! -d $INSTALL_DIR ]; then
mkdir -p $INSTALL_DIR
fi
cd $BUILD_DIR
echo cmake ../$LLVM_SRC -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
cmake ../$LLVM_SRC -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment