]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: makefile: only compute alternative options if required
authorWilly Tarreau <w@1wt.eu>
Mon, 31 Jan 2022 14:27:58 +0000 (15:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 31 Jan 2022 20:00:35 +0000 (21:00 +0100)
commit5ea9fa62e227ba7d1a26f1edebd2acbaf3213331
tree4809216f56a2ac1c35decb23ac1921d34ca34afb
parentd521b8b61f3a94cde93ab4213f39435b64cf312f
BUILD: makefile: only compute alternative options if required

Currently, the way the "cc-opt-alt" macro works consists in always
pre-calculating the alternative value for the case the main one would
not work, and pass both to an "if" clause in shell. Most of the time
we evaluate the second one for no reason.

Let's change this to use an internal "if" function instead, and directly
pass both option names to cc-opt-alt instead of passing a pre-calculated
expression. This saves one fork/exec per option and makes the option
easier to use.
Makefile