[llvm-dev] [cfe-dev] Disk space and RAM requirements in docs
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Sat May 4 09:02:04 PDT 2019
FreeBSD defaults its system compiler to use -fstandalone-debug - this
option produces significantly more debug info per object file (though
if you use DWARF type units, -fdebug-types-section, at least the
executables won't be any larger with/without -fstandalone-debug) so
that the resulting binaries can be successfully debugged with LLDB.
If you don't plan to use LLDB, I'd suggest disabling this feature by
adding -fno-standalone-debug somewhere in your compiler arguments.
I'd also suggest using Split DWARF (there's a CMake variable for that
- I forget the exact name, but searching your CMakeCache.txt for
"SPLIT" should find it quick enough) as that'll reduce the debug info
size impact significantly (with the tradeoff that now the executable
will have a dependency on other files with debug info (more like the
MachO/Apple model of debug info distribution) - so you can't take the
executable & delete your build tree and still debug the binary).
On Fri, May 3, 2019 at 7:59 PM Petr Penzin via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> Thank you for all the replies.
>
> I deleted the build directory and re-ran CMake from scratch, still got
> to 70 GB on FreeBSD. My Linux debug build is around 40 GB, which is what
> is everyone seem to expect, so I have two questions:
>
> - Would it be reasonable to update the Getting Started document to bump
> up the size of statically linked debug build to 30-40 GB?
>
> - I am also very curious about the size disparity between the build on
> my machine and David's, any pointers would be greatly appreciated.
>
> On 4/30/19 6:23 AM, David Chisnall wrote:
> > On 30/04/2019 04:29, Petr Penzin via llvm-dev wrote:
> >> Hi,
> >>
> >> Have anybody recently built LLVM in Debug mode /within/ space
> >> requirements from the Getting Started doc?
> >>
> >> https://llvm.org/docs/GettingStarted.html#hardware
> >>
> >> > An LLVM-only build will need about 1-3 GB of space. A full build
> >> of LLVM and Clang will need around 15-20 GB of disk space.
> >>
> >> From my experience this numbers looks drastically low. On FreeBSD my
> >> recent builds consumed more than 70 GB and on Linux - more than 60. I
> >> am building LLVM, Clang, and LLD with all default targets and default
> >> settings. On FreeBSD I am also building Polly. Also, building
> >> `clang-check` target adds around to 20 GB to the build directory size.
> >
> > It looks as if running the tests is adding a lot of space to your
> > builds. I have three LLVM trunk build directories on this machine
> > (FreeBSD):
> >
> > Release, building clang, clang-tools-extras, and lld: 1.2GB
> > Debug, building clang, clang-tools-extras, and lld: 36GB
> > Debug + ASan, building clang, lldb, and lld: 40GB
>
> Can you please share your build settings for debug builds (any extra
> CMake variables that you set)? Are you using the system toolchain? I'll
> try to compare build output structure to the structure of Linux build
> next week, may be there are some clues.
>
> Best,
>
> Petr
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the llvm-dev
mailing list