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

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


The following commit(s) were added to refs/heads/master by this push:
     new a3e6b9f  [build] Fix LLVM build on Xcode 12.2
a3e6b9f is described below

commit a3e6b9f2e6ed5356080df5a4f372f58734db070e
Author: Grant Henke <[email protected]>
AuthorDate: Wed Nov 18 15:44:34 2020 -0600

    [build] Fix LLVM build on Xcode 12.2
    
    When building with the latest Xcode version (12.2) I found that the LLVM
    build failed to build `sanitizer_platform_limits_posix.cpp` due to the 
`stat64`
    type missing. Given we don’t need the sanitizers, I disabled building them
    to work around the issue.
    
    Example error message:
    
kudu/thirdparty/src/llvm-9.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:31:
 error: invalid application of 'sizeof' to an incomplete type 'struct stat64'
      unsigned struct_stat64_sz = sizeof(struct stat64);
    
    Change-Id: I17ea2de460aac4142469c95af201b17554c4f751
    Reviewed-on: http://gerrit.cloudera.org:8080/16746
    Reviewed-by: Alexey Serbin <[email protected]>
    Reviewed-by: Andrew Wong <[email protected]>
    Tested-by: Kudu Jenkins
---
 thirdparty/build-definitions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index e624035..fced6d4 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -284,6 +284,15 @@ build_llvm() {
         TOOLS_ARGS="$TOOLS_ARGS -DGCC_INSTALL_PREFIX=$GCC_INSTALL_PREFIX"
       fi
 
+      # Xcode 12.2 fails to buld the sanitizers and they are not needed.
+      # We disable them as a workaround to the build issues.
+      if [ -n "$OS_OSX" ]; then
+        # Disable the sanitizers and xray to prevent sanitizer_common 
compilation.
+        # See 
https://github.com/llvm-mirror/compiler-rt/blob/749af53928a31afa3111f27cc41fd15849d86667/lib/CMakeLists.txt#L11-L14
+        TOOLS_ARGS="$TOOLS_ARGS -DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+        TOOLS_ARGS="$TOOLS_ARGS -DCOMPILER_RT_BUILD_XRAY=OFF"
+      fi
+
       # Depend on zlib from the thirdparty tree. It's an optional dependency 
for
       # LLVM, but a required [1] one for IWYU. When TSAN is enabled these flags
       # are already set by build-thirdparty.sh in order to support the

Reply via email to