SIGN IN SIGN UP

processor: report actual JIT target in pkgimage rejection debug output (#61808)

## Summary

`jl_reflect_clone_targets` (exposed as `Base.current_image_targets()`)
was re-resolving `jl_options.cpu_target` from scratch via
`jl_get_llvm_clone_targets`, returning the originally-configured target
spec list rather than the JIT target that `match_pkgimg_target` actually
compares pkgimage clones against. The JIT target (`jit_targets.front()`)
differs from the configured one because it is:

- intersected with the loaded sysimage's clone features,
- clamped by max vector-register width (e.g., AVX-512 features are
stripped when the matched sysimage clone caps at AVX2).

As a result, `JULIA_DEBUG=loading` printed identical "Image Targets" and
"Current Targets" feature strings on pkgimage rejection — hiding the
real mismatch and making the rejection look spurious. See #61621 for two
examples.

This change makes `jl_reflect_clone_targets` serialize `jit_targets`
directly, with a fallback to the prior behavior in case it has not yet
been populated.

Fixes #61621

Pull request was written with the assistance of generative AI (Claude).

## Test plan

- [ ] Trigger a pkgimage rejection (e.g. load a pkgimage built against a
different sysimage clone) with `JULIA_DEBUG=loading` and confirm
"Current Targets" now shows the post-match JIT feature set rather than
the unmatched cpu_target spec.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
G
Gabriel Baraldi committed
820bab15f8d9e1f471df46c99ca4ffdae766b57a
Parent: 8bb4ad6
Committed by GitHub <noreply@github.com> on 5/22/2026, 2:28:47 PM