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

alexey pushed a commit to branch branch-1.18.x
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/branch-1.18.x by this push:
     new 3e0d3d523 [thirdparty] build only native LLVM target
3e0d3d523 is described below

commit 3e0d3d5236e97b006e8a92b1622377bb47bf71c4
Author: Alexey Serbin <[email protected]>
AuthorDate: Wed Jan 22 10:02:38 2025 -0800

    [thirdparty] build only native LLVM target
    
    Since Kudu's build isn't targeting cross-compilation for other than
    the native platform where it's being built at, there isn't much sense
    building LLVM targets for all the platforms supported by Kudu as of now
    (i.e. 'X86' and 'AArch64') or at some extent evaluated (i.e. 'PowerPC').
    So, this patch sets LLVM_TARGETS_TO_BUILD cmake variable [1] to 'host'
    (same as 'Native') to reduce build times and space utilized
    by the thirdparty components.
    
    This is a follow-up to 76c1c4a24 and 441d8bdb7.
    
    I measured compilation times and amount of disk spaces taken by the
    LLVM/CLANG results bits before and after this patch on a powerful
    machine with many CPU cores; see below for the results.
    
    Before-and-after stats for:
      time ./build-support/enable_devtoolset.sh 
./thirdparty/build-thirdparty.sh llvm
    
      before:
        real    31m32.537s
        user    430m20.627s
        sys     40m18.992s
    
      after:
        real    29m49.401s
        user    403m10.287s
        sys     39m10.828s
    
    Before-and-after stats for:
      cd $KUDU_HOME/build && du -hs llvm-11.0.0*
    
      before:
        2.8G    llvm-11.0.0
        49M     llvm-11.0.0.libcxx
        8.4M    llvm-11.0.0.libcxxabi
        2.7M    llvm-11.0.0.libcxxabi.tsan
        27M     llvm-11.0.0.libcxx.tsan
        1.2G    llvm-11.0.0.tsan
    
      after:
        2.7G    llvm-11.0.0
        49M     llvm-11.0.0.libcxx
        8.4M    llvm-11.0.0.libcxxabi
        2.7M    llvm-11.0.0.libcxxabi.tsan
        27M     llvm-11.0.0.libcxx.tsan
        1016M   llvm-11.0.0.tsan
    
    [1] https://llvm.org/docs/CMake.html
    
    Change-Id: Idfa65fb0704a0cd3be8242a4483396c4c71b62f0
    Reviewed-on: http://gerrit.cloudera.org:8080/22369
    Tested-by: Alexey Serbin <[email protected]>
    Reviewed-by: Yifan Zhang <[email protected]>
    (cherry picked from commit de9a0370e5238ee731fb8e73ee2ea6d299c40dae)
    Reviewed-on: http://gerrit.cloudera.org:8080/22375
---
 thirdparty/build-definitions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 3d92cc904..a0255124f 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -344,7 +344,7 @@ build_llvm() {
     -DLLVM_INCLUDE_EXAMPLES=OFF \
     -DLLVM_INCLUDE_TESTS=OFF \
     -DLLVM_INCLUDE_UTILS=OFF \
-    -DLLVM_TARGETS_TO_BUILD="X86;AArch64;PowerPC" \
+    -DLLVM_TARGETS_TO_BUILD=host \
     -DLLVM_ENABLE_RTTI=ON \
     -DCMAKE_CXX_FLAGS="$CLANG_CXXFLAGS" \
     -DCMAKE_EXE_LINKER_FLAGS="$CLANG_LDFLAGS" \

Reply via email to