Skip to content

Expand JULIA_CPU_TARGET docs #58968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/src/devdocs/pkgimg.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ Dynamic libraries on macOS need to link against `-lSystem`. On recent macOS vers
To that effect we link with `-undefined dynamic_lookup`.

## [Package images optimized for multiple microarchitectures](@id pkgimgs-multi-versioning)
Similar to [multi-versioning](@ref sysimg-multi-versioning) for system images, package images support multi-versioning. If you are in a heterogeneous environment, with a unified cache,
you can set the environment variable `JULIA_CPU_TARGET=generic` to multi-version the object caches.

Similar to [multi-versioning](@ref sysimg-multi-versioning) for system images, package images support multi-versioning. This allows creating package caches that can run efficiently on different CPU architectures within the same environment.

See the [`JULIA_CPU_TARGET`](@ref JULIA_CPU_TARGET) environment variable for more information on how to set the CPU target for package images.

## Flags that impact package image creation and selection

Expand Down
4 changes: 4 additions & 0 deletions doc/src/manual/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,10 @@ A `generic` or empty CPU name means the basic required feature set of the target
which is at least the architecture the C/C++ runtime is compiled with. Each string
is interpreted by LLVM.

!!! note
Package images can only target the same or more specific CPU features than
their base system image.

A few special features are supported:

1. `sysimage`
Expand Down