From 0f3bb466b868b523cf1dc9b2aaaed65c77b28862 Mon Sep 17 00:00:00 2001 From: Derek Mauro <761129+derekmauro@users.noreply.github.com> Date: Wed, 21 Oct 2020 08:32:42 -0400 Subject: Cherry-picks for LTS 2020_09_23 Patch Release 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. --- ci/macos_xcode_cmake.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'ci/macos_xcode_cmake.sh') 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 -- cgit v1.2.3