You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/09/29 17:37:07 UTC

[kudu] branch master updated: [thirdparty] Fix LLVM build on macOS with Xcode 12

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 6597422  [thirdparty] Fix LLVM build on macOS with Xcode 12
6597422 is described below

commit 6597422c25b4ffc6133610a5fd89c9acc2c7983b
Author: Grant Henke <gr...@apache.org>
AuthorDate: Tue Sep 29 11:07:17 2020 -0500

    [thirdparty] Fix LLVM build on macOS with Xcode 12
    
    After upgrading Xcode I started seeing failures when building
    thirdparty. An example is below. It looks like the issue
    stems from a change in the default architecture to include
    arm64. Full details on the issue can be seen here:
    https://gitlab.kitware.com/cmake/cmake/-/issues/20893
    
    To work around this issue this patch sets
    `-DCMAKE_OSX_ARCHITECTURES="x86_64”` in the
    LLVM build.
    
    Example failure log:
    ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/system/libsystem_coreservices.tbd) built for iOS Simulator
    …
    fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/ghenke/Source/kudu/thirdparty/build/llvm-9.0.0/lib/libclang_rt.builtins_arm64_ios.a and /Users/ghenke/Source/kudu/thirdparty/build/llvm-9.0.0/lib/libclang_rt.builtins_arm64_iossim.a have the same architectures (arm64) and can't be in the same fat output file
    
    Change-Id: I0e7808fcd92227cd83b35f5bf1b9320c7887b603
    Reviewed-on: http://gerrit.cloudera.org:8080/16520
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 thirdparty/build-definitions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 109ed4f..e624035 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -336,6 +336,7 @@ 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" \