[thirdparty] Avoid building tsan on macOS on specific dep builds

Specific dependency builds, i.e. ones in which not all dependencies
are built, are currently failing on macOS because the current script
attempts to compile with tsan.

This just makes it so the script exits early on macOS and doesn't
get to the part where tsan deps are built.

Change-Id: I9c105274f26bb185cdaae6c046536011445f19a1
Reviewed-on: http://gerrit.cloudera.org:8080/5894
Tested-by: David Ribeiro Alves <[email protected]>
Reviewed-by: Todd Lipcon <[email protected]>
Reviewed-by: Adar Dembo <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/aa90fc02
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/aa90fc02
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/aa90fc02

Branch: refs/heads/master
Commit: aa90fc02ca8208bdc1524e89707a61559b23e664
Parents: e11e09a
Author: David Alves <[email protected]>
Authored: Fri Feb 3 02:07:47 2017 -0800
Committer: Adar Dembo <[email protected]>
Committed: Mon Feb 6 23:10:17 2017 +0000

----------------------------------------------------------------------
 thirdparty/build-thirdparty.sh | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/aa90fc02/thirdparty/build-thirdparty.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 5626633..e6340a7 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -98,6 +98,15 @@ fi
 
 
################################################################################
 
+finish() {
+  # Run the post-flight checks.
+  $TP_DIR/postflight.py
+
+  echo "---------------------"
+  echo "Thirdparty dependencies '$ARGS_TO_PRINT' built and installed 
successfully"
+  exit 0
+}
+
 for PREFIX_DIR in $PREFIX_COMMON $PREFIX_DEPS $PREFIX_DEPS_TSAN; do
   mkdir -p $PREFIX_DIR/include
 
@@ -282,6 +291,14 @@ fi
 
 restore_env
 
+# If we're on MacOs best to exit here, otherwise single dependency builds will 
try to
+# build the tsan version of the dependency (and fail).
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+  echo "Not building tsan dependencies on MacOs."
+  finish
+fi
+
 ### Build dependencies with TSAN instrumentation
 
 # Achieving good results with TSAN requires that:
@@ -433,8 +450,4 @@ fi
 
 restore_env
 
-# Now run the post-flight checks.
-$TP_DIR/postflight.py
-
-echo "---------------------"
-echo "Thirdparty dependencies '$ARGS_TO_PRINT' built and installed 
successfully"
+finish

Reply via email to