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

create-universal-binary Function

Summary

Creates a universal binary from two mono-architecture LispWorks images.

Package

hcl

Signature

create-universal-binary target-image src-image1 src-image2 => target-image

Arguments
target-image
A pathname designator.
src-image1
A pathname designator.
src-image2
A pathname designator.
Values
target-image
A pathname designator.
Description

The function create-universal-binary is intended for expert use only. The function save-universal-from-script and the Application Builder in the LispWorks IDE are simpler ways to create a universal binary.

create-universal-binary writes a universal binary to the file target-image from the saved image files specified by src-image1 and src-image2. The value of target-image is returned.

The source images src-image1 and src-image2 must both be LispWorks for Macintosh mono-architecture ("thin") images and one should be for the arm64 architecture and the other for the x86_64 architecture (the order is immaterial). For example, they could have been created by save-image or deliver.

Notes

create-universal-binary checks that src-image1 and src-image2 are LispWorks images of different architectures, but it does not check how they were saved or how similar they are. You need to ensure that both images contain the same functionality.

create-universal-binary can only be called from a LispWorks for Macintosh image that is itself a universal binary, such as the distributed image.

Compatibility note

In LispWorks 6,1 for Macintosh and earlier versions, create-universal-binary was implemented as above.

In LispWorks 7.0 and 7.1, create-universal-binary was deprecated and always signaled an error.

Examples

Suppose that you have saved two images, my-application-arm64 and my-application-x86_64, which contain the same application code loaded on an arm64 Macintosh and a x86_64 Macintosh. The following command will combine them into a universal binary my-application that will run on both kinds of Macintosh:

(create-universal-binary "my-application"
                         "my-application-arm64"
                         "my-application-x86_64")
See also

save-image
save-universal-from-script


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