summaryrefslogtreecommitdiff
path: root/ci/macos_xcode_cmake.sh
diff options
context:
space:
mode:
authorGravatar Derek Mauro <761129+derekmauro@users.noreply.github.com>2020-10-21 08:32:42 -0400
committerGravatar GitHub <noreply@github.com>2020-10-21 08:32:42 -0400
commit0f3bb466b868b523cf1dc9b2aaaed65c77b28862 (patch)
tree95f26649eedcadc58d3cadf37604e602b131f952 /ci/macos_xcode_cmake.sh
parentbd0de71e754eb3280094e89c7ac35a14dac6d61c (diff)
Cherry-picks for LTS 2020_09_23 Patch Release 220200923.2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and __tsan_mutex_try_lock * Fixes race in AddressIsReadable file descriptors using stronger memory ordering * Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid these issues in the future.
Diffstat (limited to 'ci/macos_xcode_cmake.sh')
-rwxr-xr-xci/macos_xcode_cmake.sh30
1 files changed, 19 insertions, 11 deletions
diff --git a/ci/macos_xcode_cmake.sh b/ci/macos_xcode_cmake.sh
index cf78e207..d90e273a 100755
--- a/ci/macos_xcode_cmake.sh
+++ b/ci/macos_xcode_cmake.sh
@@ -28,17 +28,25 @@ if [[ -z ${ABSL_CMAKE_BUILD_TYPES:-} ]]; then
ABSL_CMAKE_BUILD_TYPES="Debug"
fi
+if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then
+ ABSL_CMAKE_BUILD_SHARED="OFF ON"
+fi
+
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
- BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX)
- cd ${BUILD_DIR}
+ for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
+ BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX)
+ cd ${BUILD_DIR}
- # TODO(absl-team): Enable -Werror once all warnings are fixed.
- time cmake ${ABSEIL_ROOT} \
- -GXcode \
- -DCMAKE_BUILD_TYPE=${compilation_mode} \
- -DCMAKE_CXX_STANDARD=11 \
- -DABSL_USE_GOOGLETEST_HEAD=ON \
- -DABSL_RUN_TESTS=ON
- time cmake --build .
- time ctest -C ${compilation_mode} --output-on-failure
+ # TODO(absl-team): Enable -Werror once all warnings are fixed.
+ time cmake ${ABSEIL_ROOT} \
+ -GXcode \
+ -DBUILD_SHARED_LIBS=${build_shared} \
+ -DCMAKE_BUILD_TYPE=${compilation_mode} \
+ -DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined" \
+ -DABSL_USE_GOOGLETEST_HEAD=ON \
+ -DABSL_RUN_TESTS=ON
+ time cmake --build .
+ time ctest -C ${compilation_mode} --output-on-failure
+ done
done