Skip to content

julia: Julia actions on Linux x86_64 run on the source-built libjulia-internal (part of #13965) - #14192

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud/13965
Nov 20, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud/13965

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Linked Issue

Part of #13965

Changes

  • julia/private/runtime/defs.bzl: new julia_source_toolchain rule. It takes the downloaded Julia toolchain and builds a tree where lib/julia/libjulia-internal.so.<version> is the source-built library. The libjulia-internal.so and .so.<major>.<minor> names link to it. bin/* and lib/libjulia.so* are copied, so the loader's $ORIGIN stays inside the tree. Every other file is a symlink. The rule returns the stock ToolchainInfo with julia, all_files, link_files, sysimage and make_variable_info swapped for the tree's files.
  • julia/private/runtime/BUILD.bazel: adds a stock bool flag with a source_runtime config_setting, plus source_julia and source_toolchain (Linux x86_64 exec and target, pinned to the runtime Julia version). The runtime transition sets stock, so julia_runtime_files, julia_shipped_libs and the toolchain itself resolve the downloaded release instead of themselves.
  • MODULE.bazel: registers //julia/private/runtime:source_toolchain ahead of @julia_toolchains//:all. It is dev_dependency = True until the julia_src archives move to dx_pins and julia/private/runtime ships in module_srcs.
  • libjulia_internal_test: new case the_registered_toolchain_runs_on_the_built_library. It resolves julia through current_julia_toolchain and checks that the loaded libjulia-internal is the tree's copy, that it differs from the shipped library, and that it exports the source-built symbol set.

On linux_x86_64, aquery now shows JuliaPrecompile, JuliaSysimage and JuliaLink for //julia/tests/fixtures/hello/... running julia/private/runtime/source_julia/bin/julia, with --sysimage taken from the same tree.

Verification

Tested: //julia/private/runtime:libjulia_internal_test, //julia/private/runtime:libjulia_internal_test_upstream, //julia/private/runtime:julia_src_version_test, //julia/tests:all and //julia/tests/fixtures/hello:all, except hello_standalone_output_test{,_upstream}. All 13 tests passed locally on linux_x86_64. tools/dx check --apply on the four touched files: no findings.

Not run: hello_standalone_output_test (its JuliaSysimage build OOMs small hosts), determinism_check, nested-Bazel and consumer tests. Consumers are unaffected, because the registration is a dev dependency.

MODULE.bazel is a review path, so this PR needs a second-session Review: comment.


Generated by Claude Code

…-internal (part of #13965)

julia/private/runtime registers source_toolchain ahead of @julia_toolchains.
It wraps the downloaded Julia 1.13.4 toolchain in a tree whose
lib/julia/libjulia-internal is the source-built library, with julia and
libjulia copied so $ORIGIN resolves inside the tree. A stock flag keeps the
runtime rules on the downloaded release. JuliaPrecompile, JuliaSysimage and
JuliaLink now run that tree's julia and link against its libraries.
The registration is a dev dependency until the julia_src archives move to
dx_pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvrtsUC3euEfXchJYt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment train Tested; land via merge train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants