Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch add optional Clang 4.0 support for Nginx compiles in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jan 31, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    55,158
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:07 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add optional Clang 4.0 support for Nginx compiles in 123.09beta01

    For CentOS 7 where CLANG_FOUR='y' is set in persist config file at /etc/centminmod/custom_config.inc, will enable Clang 4.0 detection support. If custom Clang 4.0 binary is detected at /opt/sbin/llvm/bin/clang, and CLANG_FOUR='y set, then Nginx will compile with Clang 4.0 instead of Clang 3.4.2 when CLANG='y' is set (default). Details https://community.centminmod.com/posts/44039/


    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,158
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:07 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    first attempt on Intel Core i7 4790K 4.0Ghz with 32GB Ram 2x 240GB SSD server took ~1,338 seconds = 22.3 minutes using raw clock speed :)
    Code (Text):
    /opt/sbin/llvm/bin/clang --version
    clang version 4.0.0 (branches/release_40 293572)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm/bin
    

    Code (Text):
    ./llvm.sh
    

    Code (Text):
    ls -lahrt /root/centminlogs/ |grep llvm | tail -1
    -rw-r--r--  1 root root 2.8M Jan 31 00:23 centminmod_llvm_310117-000105.log
    

    Code (Text):
    tail -1 /root/centminlogs/centminmod_llvm_310117-000105.log
    Total LLVM 4 Build Time: 1338.368736902 seconds
    

    Code (Text):
    ls -lah /opt/sbin/llvm/bin/
    total 738M
    drwxr-xr-x 2 root root 4.0K Jan 31 00:23 .
    drwxr-xr-x 7 root root 4.0K Jan 31 00:23 ..
    -rwxr-xr-x 1 root root  16M Jan 31 00:18 bugpoint
    -rwxr-xr-x 1 root root  18M Jan 31 00:23 c-index-test
    lrwxrwxrwx 1 root root    9 Jan 31 00:23 clang -> clang-4.0
    lrwxrwxrwx 1 root root    5 Jan 31 00:23 clang++ -> clang
    -rwxr-xr-x 1 root root  74M Jan 31 00:22 clang-4.0
    -rwxr-xr-x 1 root root 1.9M Jan 31 00:22 clang-apply-replacements
    -rwxr-xr-x 1 root root  19M Jan 31 00:22 clang-change-namespace
    -rwxr-xr-x 1 root root  54M Jan 31 00:22 clang-check
    lrwxrwxrwx 1 root root    5 Jan 31 00:23 clang-cl -> clang
    lrwxrwxrwx 1 root root    5 Jan 31 00:23 clang-cpp -> clang
    -rwxr-xr-x 1 root root 2.1M Jan 31 00:12 clang-format
    -rwxr-xr-x 1 root root  22M Jan 31 00:22 clang-import-test
    -rwxr-xr-x 1 root root  18M Jan 31 00:18 clang-include-fixer
    -rwxr-xr-x 1 root root 2.7M Jan 31 00:11 clang-offload-bundler
    -rwxr-xr-x 1 root root  20M Jan 31 00:22 clang-query
    -rwxr-xr-x 1 root root  18M Jan 31 00:22 clang-rename
    -rwxr-xr-x 1 root root  18M Jan 31 00:22 clang-reorder-fields
    -rwxr-xr-x 1 root root  26M Jan 31 00:22 clang-tidy
    -rwxr-xr-x 1 root root  18M Jan 31 00:18 find-all-symbols
    -rwxr-xr-x 1 root root  21K Jan 31 00:01 git-clang-format
    -rwxr-xr-x 1 root root  38M Jan 31 00:22 llc
    -rwxr-xr-x 1 root root  20M Jan 31 00:23 lli
    -rwxr-xr-x 1 root root  13M Jan 31 00:22 llvm-ar
    -rwxr-xr-x 1 root root 2.2M Jan 31 00:18 llvm-as
    -rwxr-xr-x 1 root root 357K Jan 31 00:18 llvm-bcanalyzer
    -rwxr-xr-x 1 root root 2.1M Jan 31 00:18 llvm-cat
    -rwxr-xr-x 1 root root 139K Jan 31 00:03 llvm-config
    -rwxr-xr-x 1 root root 2.9M Jan 31 00:18 llvm-cov
    -rwxr-xr-x 1 root root  31M Jan 31 00:23 llvm-c-test
    -rwxr-xr-x 1 root root 2.5M Jan 31 00:22 llvm-cxxdump
    -rwxr-xr-x 1 root root 122K Jan 31 00:03 llvm-cxxfilt
    -rwxr-xr-x 1 root root 2.0M Jan 31 00:18 llvm-diff
    -rwxr-xr-x 1 root root 1.7M Jan 31 00:18 llvm-dis
    -rwxr-xr-x 1 root root  31M Jan 31 00:22 llvm-dsymutil
    -rwxr-xr-x 1 root root 2.7M Jan 31 00:18 llvm-dwarfdump
    -rwxr-xr-x 1 root root  30M Jan 31 00:23 llvm-dwp
    -rwxr-xr-x 1 root root 3.0M Jan 31 00:18 llvm-extract
    lrwxrwxrwx 1 root root    7 Jan 31 00:23 llvm-lib -> llvm-ar
    -rwxr-xr-x 1 root root 2.9M Jan 31 00:18 llvm-link
    -rwxr-xr-x 1 root root  38M Jan 31 00:22 llvm-lto
    -rwxr-xr-x 1 root root  39M Jan 31 00:23 llvm-lto2
    -rwxr-xr-x 1 root root  15M Jan 31 00:22 llvm-mc
    -rwxr-xr-x 1 root root 294K Jan 31 00:03 llvm-mcmarkup
    -rwxr-xr-x 1 root root 1.8M Jan 31 00:18 llvm-modextract
    -rwxr-xr-x 1 root root  14M Jan 31 00:22 llvm-nm
    -rwxr-xr-x 1 root root  14M Jan 31 00:22 llvm-objdump
    -rwxr-xr-x 1 root root 378K Jan 31 00:18 llvm-opt-report
    -rwxr-xr-x 1 root root 1.4M Jan 31 00:18 llvm-pdbdump
    -rwxr-xr-x 1 root root 1.1M Jan 31 00:07 llvm-profdata
    lrwxrwxrwx 1 root root    7 Jan 31 00:23 llvm-ranlib -> llvm-ar
    -rwxr-xr-x 1 root root 3.6M Jan 31 00:18 llvm-readobj
    -rwxr-xr-x 1 root root  12M Jan 31 00:23 llvm-rtdyld
    -rwxr-xr-x 1 root root 2.5M Jan 31 00:18 llvm-size
    -rwxr-xr-x 1 root root 2.4M Jan 31 00:18 llvm-split
    -rwxr-xr-x 1 root root 3.0M Jan 31 00:18 llvm-stress
    -rwxr-xr-x 1 root root 282K Jan 31 00:18 llvm-strings
    -rwxr-xr-x 1 root root 2.8M Jan 31 00:18 llvm-symbolizer
    -rwxr-xr-x 1 root root 2.1M Jan 31 00:03 llvm-tblgen
    -rwxr-xr-x 1 root root 2.9M Jan 31 00:23 llvm-xray
    -rwxr-xr-x 1 root root  18M Jan 31 00:17 modularize
    -rwxr-xr-x 1 root root 3.0M Jan 31 00:18 obj2yaml
    -rwxr-xr-x 1 root root  44M Jan 31 00:23 opt
    -rwxr-xr-x 1 root root  13M Jan 31 00:22 sancov
    -rwxr-xr-x 1 root root 2.6M Jan 31 00:18 sanstats
    -rwxr-xr-x 1 root root  53K Jan 31 00:01 scan-build
    -rwxr-xr-x 1 root root 4.4K Jan 31 00:01 scan-view
    -rwxr-xr-x 1 root root 2.4M Jan 31 00:18 verify-uselistorder
    -rwxr-xr-x 1 root root 769K Jan 31 00:18 yaml2obj


    Clang 4.0 without ccache as first time compile seems to compile Nginx ~10-15 seconds faster than GCC at ~75 seconds. So is it worth the 1,338+ seconds compile time ? :)