Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Should facebook-clang-plugins allow for CMake CMAKE_BUILD_TYPE to be configurable? #22

Open
aytey opened this issue Jun 16, 2020 · 4 comments

Comments

@aytey
Copy link
Contributor

aytey commented Jun 16, 2020

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.

@jvillard
Copy link
Contributor

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).

@aytey
Copy link
Contributor Author

aytey commented Jun 17, 2020

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!

@jvillard
Copy link
Contributor

Do you know what MinSizeRel does?

@aytey
Copy link
Contributor Author

aytey commented Jun 17, 2020

Yeah, does -Os as you suggested, so I would guess the resulting .os/.as/.sos are already smaller before doing the install.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants