[build2] Installation Error on Manjaro
Matthew Krupcale
mkrupcale at matthewkrupcale.com
Tue Apr 7 16:05:47 UTC 2020
On Tue, Apr 7, 2020 at 4:50 AM Boris Kolpackov <boris at codesynthesis.com> wrote:
> Yes, that would be an alternative and we already do something like this
> to detect the C/C++ stdlib (see libbuild2/cc/guess.cxx). However, I see
> a number of issues:
> ...
> 3. This would require a preprocessor run which is probably quite a bit
> slower than --version.
Yeah, given that you have to run those other commands anyways, it's
probably best to avoid running the preprocessor if you can. For
reference:
$ time for i in $(seq 0 1000); do gcc -E -P -xc - <<<"__GNUC__"
&>/dev/null; done
real 0m8.694s
user 0m3.177s
sys 0m5.354s
$ time for i in $(seq 0 1000); do gcc -v -E < /dev/null &>/dev/null; done
real 0m2.192s
user 0m0.610s
sys 0m1.608s
So it's somewhere around 4 times more time-consuming to run the
preprocessor than just e.g. `-v`, `--version`, `-print-search-dirs` on
my system.
Matthew
More information about the users
mailing list