[flang-dev] Comparing build times for flang

Peter Steinfeld via flang-dev flang-dev at lists.llvm.org
Fri Dec 11 10:43:28 PST 2020


I've been playing around with the scripts I use to build flang in and out of tree.  I don't think I used to be able to do this, but I can now build the front end by only specifying "flang" in the define for "DLLVM_ENABLE_PROJECTS".  Here's my full build script for doing in in-tree build of the front end:

#!/bin/bash
cmake -G Ninja ../llvm \
  -DCMAKE_BUILD_TYPE=Release \
  -DFLANG_ENABLE_WERROR=On \
  -DLLVM_ENABLE_PROJECTS="flang" \
  -DCMAKE_CXX_STANDARD=17 \
  -DLLVM_TARGETS_TO_BUILD=host \
  -DLLVM_LIT_ARGS=-v \
  -DLLVM_INSTALL_UTILS=On \
  -DCMAKE_INSTALL_PREFIX=../install

When I build clang, flang, and mlir, it takes 6 minutes, 8 seconds and produces an install area of 1.9 GB.  When I do in in-tree build of just the flang front end, it takes 4 minutes, 33 seconds and produces an install area of 1.3 GB.  When I do an out-of-tree build, it takes 1 minute 52 seconds, and produces a build area of 651 MB.

All of these times are running on a powerful lab machine using the GNU C++ compiler.

Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20201211/70435a86/attachment.html>


More information about the flang-dev mailing list