[llvm-dev] [LLVM v3.8.0rc3] cmake-2.8.12: Statistics gcc-4.9 VS. clang-3.8

Sedat Dilek via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 25 08:13:05 PST 2016


Hi,

here some statistics when building LLVM v3.8.0rc3 with CMAKE and GCC
v4.9.2 or CLANG v3.8.0rc3 here on my Ubuntu/precise AMD64 system.

[ THE GOOD (disc-usage) ]

Compiling with clang-3.8 produces smaller binaries VS. gcc-4.9
(approx. 250MiB smaller).
Checking with 'wc -l' shows 1893 files in total for both install-dirs.

$ cd /opt ; du -s -m llvm-toolchain-3.8.0rc3_*
609     llvm-toolchain-3.8.0rc3_clang-compiled
864     llvm-toolchain-3.8.0rc3_gcc-compiled

$ LC_ALL=C wc -l ls-lR_*.txt
  1893 ls-lR_clang-compiled.txt
  1893 ls-lR_gcc-compiled.txt
  3786 total

[ THE BAD (build-time)  ]

Build-time increased approx. 1h from 2 to 3 hours when using CMAKE
instead of CONFIGURE/MAKE (logs deleted for LLVM v3.8.0rc2).
Building always done with one single parallel-compile-jobs.
When using CMAKE $COMPILER does not matter, it's approx. 3 hours build-time.

$ cat statistics/3.8.0rc3*/build*.txt

-rw-r--r-- 1 wearefam wearefam 138872 Feb 25 10:25
logs/3.8.0rc3_clang-compiled/install-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam 216544 Feb 25 10:22
logs/3.8.0rc3_clang-compiled/build-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam  14476 Feb 25 07:29
logs/3.8.0rc3_clang-compiled/configure-log_llvm-toolchain-3.8.0rc3.txt

-rw-r--r-- 1 wearefam wearefam 138872 Feb 24 18:55
logs/3.8.0rc3_gcc-compiled/install-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam 344202 Feb 24 18:45
logs/3.8.0rc3_gcc-compiled/build-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam  14295 Feb 24 15:53
logs/3.8.0rc3_gcc-compiled/configure-log_llvm-toolchain-3.8.0rc3.txt

[ AND THE UGLY ]

/me or my attached build-script?

I have not tried NINJA with CMAKE v3.x in combinations with
parallel-compile-jobs >=1.
My Samsung Ultrabook should do 5 compile-jobs in parallel.

Hope this helps a bit.

Regards,
- Sedat -

[1] https://en.wikipedia.org/wiki/The_Good,_the_Bad_and_the_Ugly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvm-toolchain.sh
Type: application/x-sh
Size: 3827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160225/fc351060/attachment.sh>


More information about the llvm-dev mailing list