Makefile: Fix cross-bootstrapped build issues #64371
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 396 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.358
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #64371"
general
weight: 0.35
topolarity
Fixes #64241
Assisted-by: Kimi Code (Kimi)
Fixes
1. Fix cross-bootstrap builds of
julia-sysimg-debugusing a releasejuliabinary and thesysbaseimage.2. Fix cross-bootstrap builds when
sysandsysbaseare in different directories.Improvements
1. Support full
debugcross-bootstrap builds using a releasejuliabinary and thesysbaseimage.2. Remove
SHLIB_EXTfrom theCROSS_BOOTSTRAP_SYSBASEpath. (@xal-0, does this look right to you?)3. Update the documentation.
4. Update comments.
Testing
I tested these changes on the following platforms:
1. Debian 13 (
6.12.133-1 x86_64 GNU/Linux)2. macOS on Apple M2 (
Darwin Kernel Version 24.5.0)3. Windows 10 (
MINGW64_NT-10.0-19045 x86_64 Msys)Test case 0 (Linux only)
Test case 1
Tested with the following
julia-debugbuild.sh:Implementation notes
1. Using
julia-debugbuild.shas an example,julia-sysimg-debugshould be built with$CBUILD/usr/bin/juliaand$CBUILD/usr/lib/julia/sysbase. The generated image should be placed in$BUILD/usr/lib/julia/and linked against thejulia-debugandjulia-internalruntime libraries. To support this, I modified the definition ofjulia_exepathincontrib/generate_precompile.jl, added parameters tolink_imageandlink_image_cmdinbase/linking.jl, and introduced theJULIA_BINDIRenvironment variable in thesysimage.mkbuild.2. The original
CROSS_BOOTSTRAPimplementation in #59033 and #59035 only supported builds up to thesysimgstage. A full build would either fail ifCROSS_BOOTSTRAP_JULIAandCROSS_BOOTSTRAP_SYSBASEwere provided or rebuild everything from scratch without them. Therefore, I used thecross_bootstrap_juliaconfiguration to ensure thatCROSS_BOOTSTRAP_JULIAandCROSS_BOOTSTRAP_SYSBASEtake effect only during thesysimgbuild stage.3. In
Test case 0, a Julia binary without TSan is used to build a TSan-enabledsysimg. The generated image has unresolved TSan symbols because those symbols are provided by the startup executable, so linking with-z defsfails. Therefore, I removed-z defsfor TSan builds and added the missingbootstrap_julia_flagstosysimg.mk.4. I found that adding
override USECCACHE=1toMake.usercausescontrib/tsan/build.shinTest case 0to fail because overridesCCandCXXfailed withccache. ~~Therefore, I addedoverride USECCACHE=0tocontrib/tsan/Make.user.tsan~~.5.
CROSS_BOOTSTRAP_SYSBASEomits the file extension for consistency withCROSS_BOOTSTRAP_JULIAand to make the documentation and scripts more portable across platforms.