Should `facebook-clang-plugins` allow for CMake `CMAKE_BUILD_TYPE` to be configurable?
Opened this issue · 4 comments
At a very quick glance, there are quite a few issues that are related to not being able to build Infer due to running out of space:
Despite having 70 GiB free on one my VMs, I can't install facebook-clang-plugins
(i.e., the build succeeds, but copying the artefacts in to the destination folder fails).
I "fixed" this by using MinSizeRel
over Release
for CMAKE_BUILD_TYPE
.
Is this something that's reasonable to allow to be configurable? Should ./clang/setup.sh
take a parameter (e.g., --cmake-build-type <string>
) that allows you to select a particular build type?
Happy to do this work, but I only want to "polish" it if it is something that (as an idea) is acceptable to merge.
From what I can find on the web, MinSizeRel
is the same as Release
but passing -Os
instead of -O3
. I don't think that is desirable or that it will help hugely with the space issue. What we would need is a way to strip binaries and libraries as we go. I remember that at some point we were able to do that by passing some option to the compiler directly but that only worked on Linux (see eg a340f3d).
All I can say is that, for me, when I only had 70 GiB free (🤣), changing from Release
to MinSizeRel
was the difference between able to install and not being able to install!
Do you know what MinSizeRel
does?
Yeah, does -Os
as you suggested, so I would guess the resulting .o
s/.a
s/.so
s are already smaller before doing the install.