All Manuals > LispWorks® User Guide and Reference Manual > 37 The HCL Package

building-main-architecture-p Function

Summary

Determine whether LispWorks is building the main architecture of an executable.

Package

hcl

Signature

building-main-architecture-p => main-architecture-p

Values
main-architecture-p
A boolean.
Description

The function building-main-architecture-p returns nil when it is called inside the x86_64 subprocess that save-universal-from-script runs on an arm64 Macintosh, and t in all other cases (including when running on an x86_64 Macintosh).

The purpose of building-main-architecture-p is to control execution of forms in a build script that is passed to save-universal-from-script, such that they are executed only once, even though the script is executed twice. Since it also returns t outside of save-universal-from-script, using building-main-architecture-p makes the script execute the form once whether it used to build a mono-architecure executable or a universal binary one.

Notes

In LispWorks 6.1 and earlier, there was a function save-argument-real-p that had the same behaviour and in LispWorks 7.0 and 7.1 save-argument-real-p always returned t.

Examples
(example-file "configuration/save-macos-application.lisp")
See also

save-universal-from-script
building-universal-intermediate-p


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35