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 78bb241  [thirpdarty] Improve LLVM build for macOS
78bb241 is described below

commit 78bb24126d4ba93272a35c08d2220c4de2b87f85
Author: Grant Henke <[email protected]>
AuthorDate: Thu Dec 10 08:49:00 2020 -0600

    [thirpdarty] Improve LLVM build for macOS
    
    This patch adjusts the LLVM build definition to disable simulator
    platforms on OSX that we do not support. This solves the issue
    that was worked around via 6597422 in a way that does not prevent
    building on aarch64 architectures.
    
    Change-Id: I45c60cd2da120906c436b5592ad6b9e6a89dde66
    Reviewed-on: http://gerrit.cloudera.org:8080/16853
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <[email protected]>
---
 thirdparty/build-definitions.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 70e7af3..3baf422 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -284,13 +284,18 @@ 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
+        # Xcode 12.2 fails to build the sanitizers and they are not needed.
+        # We disable them as a workaround to the build issues.
         # 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"
+
+        # Disable Apple platforms the we do not support.
+        TOOLS_ARGS="$TOOLS_ARGS -DCOMPILER_RT_ENABLE_IOS=OFF"
+        TOOLS_ARGS="$TOOLS_ARGS -DCOMPILER_RT_ENABLE_WATCHOS=OFF"
+        TOOLS_ARGS="$TOOLS_ARGS -DCOMPILER_RT_ENABLE_TVOS=OFF"
       fi
 
       # Depend on zlib from the thirdparty tree. It's an optional dependency 
for
@@ -345,7 +350,6 @@ build_llvm() {
     -DLLVM_INCLUDE_UTILS=OFF \
     -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
     -DLLVM_ENABLE_RTTI=ON \
-    -DCMAKE_OSX_ARCHITECTURES="x86_64" \
     -DCMAKE_CXX_FLAGS="$CLANG_CXXFLAGS" \
     -DCMAKE_EXE_LINKER_FLAGS="$CLANG_LDFLAGS" \
     -DCMAKE_MODULE_LINKER_FLAGS="$CLANG_LDFLAGS" \

Reply via email to