cannot use git log to get REPO_ID when building from release source
@@ -51,7 +51,14 @@ else
TARGETS_TO_BUILD="AMDGPU;${AOMP_NVPTX_TARGET}X86"
fi
fi
-MYCMAKEOPTS="-DLLVM_ENABLE_PROJECTS=clang;lld -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_PROJECT -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=$TARGETS_TO_BUILD $COMPILERS -DLLVM_VERSION_SUFFIX=_AOMP_Version_$AOMP_VERSION_STRING -DBUG_REPORT_URL='https://github.com/ROCm-Developer-Tools/aomp' -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INCLUDE_BENCHMARKS=0 -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib"
+
+# When building from release source (no git), turn off test items that are not distributed
+if [ "$AOMP_CHECK_GIT_BRANCH" == 1 ] ; then
+ DO_TESTS=""
+else
+ DO_TESTS="-DLLVM_BUILD_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF"
+fi
+MYCMAKEOPTS="-DLLVM_ENABLE_PROJECTS=clang;lld -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_PROJECT -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=$TARGETS_TO_BUILD $COMPILERS -DLLVM_VERSION_SUFFIX=_AOMP_Version_$AOMP_VERSION_STRING -DBUG_REPORT_URL='https://github.com/ROCm-Developer-Tools/aomp' -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF $DO_TESTS -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib"
if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then
help_build_aomp
@@ -82,7 +89,11 @@ fi
if [ "$AOMP_PROJECT_REPO_BRANCH" != "master" ] ; then
# Fix the banner to print the AOMP version string.
cd $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME
+if [ "$AOMP_CHECK_GIT_BRANCH" == 1 ] ; then
MONO_REPO_ID=`git log | grep -m1 commit | cut -d" " -f2`
+else
+ MONO_REPO_ID="build_from_release_source"
+fi
SOURCEID="Source ID:$AOMP_VERSION_STRING-$MONO_REPO_ID"
TEMPCLFILE="/tmp/clfile$$.cpp"
ORIGCLFILE="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm/lib/Support/CommandLine.cpp"
