This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 7d80aedc3e0ee634e2a229fba8388f01097189de
Author: Csaba Ringhofer <csringho...@cloudera.com>
AuthorDate: Mon Apr 29 18:07:14 2019 +0200

    IMPALA-8468: buildall.sh should warn that asan/ubsan/... are exclusive
    
    Before the fix "buidall.sh -asan -ubsan -tsan -tidy" ran without
    giving any warning, but actually only tsan did have effect. Added
    a check for this.
    
    Change-Id: Iecaf1e1987a92dd911b30cf11b6e762320bdc4e5
    Reviewed-on: http://gerrit.cloudera.org:8080/13177
    Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
    Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
 buildall.sh | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/buildall.sh b/buildall.sh
index 45bb776..125fbcb 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -275,14 +275,15 @@ Examples of common tasks:
   shift;
 done
 
+declare -a CMAKE_BUILD_TYPE_LIST
 # Adjust CMAKE_BUILD_TYPE for ASAN and code coverage, if necessary.
 if [[ ${CODE_COVERAGE} -eq 1 ]]; then
   case ${CMAKE_BUILD_TYPE} in
     Debug)
-      CMAKE_BUILD_TYPE=CODE_COVERAGE_DEBUG
+      CMAKE_BUILD_TYPE_LIST+=(CODE_COVERAGE_DEBUG)
       ;;
     Release)
-      CMAKE_BUILD_TYPE=CODE_COVERAGE_RELEASE
+      CMAKE_BUILD_TYPE_LIST+=(CODE_COVERAGE_RELEASE)
       ;;
   esac
 fi
@@ -293,19 +294,26 @@ if [[ ${BUILD_ASAN} -eq 1 ]]; then
     echo "Address sanitizer build not supported for build type: 
${CMAKE_BUILD_TYPE}"
     exit 1
   fi
-  CMAKE_BUILD_TYPE=ADDRESS_SANITIZER
+  CMAKE_BUILD_TYPE_LIST+=(ADDRESS_SANITIZER)
 fi
 if [[ ${BUILD_TIDY} -eq 1 ]]; then
-  CMAKE_BUILD_TYPE=TIDY
+  CMAKE_BUILD_TYPE_LIST+=(TIDY)
 fi
 if [[ ${BUILD_UBSAN} -eq 1 ]]; then
-  CMAKE_BUILD_TYPE=UBSAN
+  CMAKE_BUILD_TYPE_LIST+=(UBSAN)
 fi
 if [[ ${BUILD_UBSAN_FULL} -eq 1 ]]; then
-  CMAKE_BUILD_TYPE=UBSAN_FULL
+  CMAKE_BUILD_TYPE_LIST+=(UBSAN_FULL)
 fi
 if [[ ${BUILD_TSAN} -eq 1 ]]; then
-  CMAKE_BUILD_TYPE=TSAN
+  CMAKE_BUILD_TYPE_LIST+=(TSAN)
+fi
+if [[ -v CMAKE_BUILD_TYPE_LIST ]]; then
+  if [[ ${#CMAKE_BUILD_TYPE_LIST[@]} -gt 1 ]]; then
+    echo "ERROR: more than one CMake build type defined: 
${CMAKE_BUILD_TYPE_LIST[@]}"
+    exit 1
+  fi
+  CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_LIST[0]}
 fi
 
 # If we aren't kerberized then we certainly don't need to talk about

Reply via email to