Page MenuHomeFreeBSD

Only compute the X_COMPILER_*/X_LINKER_* variables when needed
ClosedPublic

Authored by arichardson on Sep 5 2018, 3:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 5:42 AM
Unknown Object (File)
Dec 1 2024, 2:09 AM
Unknown Object (File)
Nov 25 2024, 2:23 PM
Unknown Object (File)
Nov 25 2024, 9:03 AM
Unknown Object (File)
Nov 23 2024, 6:39 AM
Unknown Object (File)
Nov 22 2024, 1:23 PM
Unknown Object (File)
Nov 21 2024, 3:05 PM
Unknown Object (File)
Nov 20 2024, 12:30 PM
Subscribers
None

Details

Summary

When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line.
This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD
in bsd.linker.mk) which causes it to call ${XCC} --version and
${XLD} --version (plus various awk+sed+echo calls) in every subdirectory.
For incremental builds and stages that only walk the source tree this is
often the majority of the time spent in that directory.

By only computing the value of the X_COMPILER_*/X_LINKER_* variables if
_WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls
to once per build stage instead of once per recursive make.

With this change (and no changes to the sources) the make includes stage
now takes 28 seconds at -j1 instead of 86 seconds.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19415
Build 19012: arc lint + arc unit