HomeFreeBSD

Avoid recomputing COMPILER_/LINKER_ variables when set explicitly

Description

Avoid recomputing COMPILER_/LINKER_ variables when set explicitly

I noticed that when we build libraries for a different ABI (in CheriBSD) we
were calling ${XCC}/${LD} --version for every directory. It turns out that
this was caused by bsd.compat.mk explicitly setting (X_)COMPILER variables
for that build stage and this stops the _can_export logic from working.
To fix this, we change the check to only set _can_export=no if the variable
is set and it is set to a different value than the cached value.
This noticeably speeds up the tree walk while building compat libraries.
During an upstream amd64 buildworld this also removes 8 --version calls.

Obtained from: CheriBSD
Reviewed By: brooks, emaste
Differential Revision: https://reviews.freebsd.org/D25986

Details

Provenance
arichardsonAuthored on Aug 26 2020, 10:21 AM
Parents
rG18de62a94a6e: Move libsqlite3 to the top of the SUBDIR list
Branches
Unknown
Tags
Unknown

Event Timeline