[all-commits] [llvm/llvm-project] c7816d: clang-linker-wrapper: Set the host DataLayout on t...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Sep 17 06:38:00 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7816d6462677e69f52e59caf638db2c1669f940
https://github.com/llvm/llvm-project/commit/c7816d6462677e69f52e59caf638db2c1669f940
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
A clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-host-datalayout.c
M clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-image.c
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Log Message:
-----------
clang-linker-wrapper: Set the host DataLayout on the offload wrapper module (#224280)
The offload wrapper module was created with only a target triple, and
the datalayout wasn't set until later, where it was copied from the
TargetMachine, after the wrapping code already ran.
The wrapping code did query the datalayout for the pointer size, so this
was broken for host and devices with different pointer sizes. queries the
DataLayout (e.g. the size_t / intptr type via getSizeTTy), so on a
host whose pointer size differs from the default layout (e.g. a 32-bit
host) it used the wrong integer width for image offsets.
This removes a use of TargetMachine::createDataLayout, which I am trying
to remove.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list