Skip to content

Align runtime datalayout when relinking after non-integral stripping#852

Merged
maleadt merged 1 commit into
mainfrom
tb/fix-runtime-relink-datalayout
Jun 19, 2026
Merged

Align runtime datalayout when relinking after non-integral stripping#852
maleadt merged 1 commit into
mainfrom
tb/fix-runtime-relink-datalayout

Conversation

@maleadt

@maleadt maleadt commented Jun 19, 2026

Copy link
Copy Markdown
Member

The post-GC-lowering runtime relink runs after RemoveNIPass has stripped Julia's non-integral address spaces from the module datalayout, while the cached runtime library still carries them. This produced a spurious "Linking two modules of different data layouts" warning during (pre)compilation.

Align the runtime's triple and datalayout to the destination before linking, mirroring how target libraries (e.g. libdevice) are linked.

Fixes JuliaGPU/CUDA.jl#3177

The post-GC-lowering runtime relink runs after `RemoveNIPass` has
stripped Julia's non-integral address spaces from the module datalayout,
while the cached runtime library still carries them. This produced a
spurious "Linking two modules of different data layouts" warning during
(pre)compilation.

Align the runtime's triple and datalayout to the destination before
linking, mirroring how target libraries (e.g. libdevice) are linked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maleadt maleadt merged commit e8ba6b8 into main Jun 19, 2026
36 of 37 checks passed
@maleadt maleadt deleted the tb/fix-runtime-relink-datalayout branch June 19, 2026 10:34
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.85%. Comparing base (f81b87a) to head (bb344f1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #852   +/-   ##
=======================================
  Coverage   79.84%   79.85%           
=======================================
  Files          25       25           
  Lines        4738     4740    +2     
=======================================
+ Hits         3783     3785    +2     
  Misses        955      955           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CUDACore - warning during precompilation

1 participant