[all-commits] [llvm/llvm-project] 3e2973: clang-linker-wrapper: Use AMDGPU::TargetID for ima...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Tue Jul 14 10:26:28 PDT 2026
Branch: refs/heads/users/arsenm/reapply/clang-linker-wrapper-use-amdgpu-targetid-device-image-compatibility
Home: https://github.com/llvm/llvm-project
Commit: 3e2973c5c0041648d20a1517f18a4552f3c723a2
https://github.com/llvm/llvm-project/commit/3e2973c5c0041648d20a1517f18a4552f3c723a2
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
M llvm/lib/Object/OffloadBinary.cpp
M llvm/lib/TargetParser/AMDGPUTargetParser.cpp
M llvm/unittests/TargetParser/TargetParserTest.cpp
Log Message:
-----------
clang-linker-wrapper: Use AMDGPU::TargetID for image compatibilty (2)
This reverts commit aa5960600ac38fcd923e69777bad1293f56658d7.
Before the first attempt, clang-linker-wrapper inconsistently
applied linker reasoning to the target ID feature modifiers, but
not the base processor. e.g., gfx90a was considered mergable
with gfx90a:xnack+.
The first attempt at this changed introduced and used
TargetID::isCompatibleWith, which applied full linking
compatibility logic. This broke tests which combined
generic and covered non-generic targets in the build (e.g.,
gfx9-generic and gfx900). The archives would both be treated
as compatible, resulting in multiple definition errors.
Split the TargetID compatibility checks into 2 different kinds:
1 for exact target match used for archives, and 1 for logical
compatibility usable for objects. For archive purposes, this stops
treating xnack-any as the same target with an xnack specifier which
is a behavior change. It just so happens that clang would error if you
tried to compile xnack-any and xnack+/- in the same invocation, so this
behavior was only observable when directly using the binary tools.
Commit: 54046206f7d86acbcf710a095d93f175a3c19928
https://github.com/llvm/llvm-project/commit/54046206f7d86acbcf710a095d93f175a3c19928
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M llvm/include/llvm/Object/OffloadBinary.h
M llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
M llvm/lib/Object/OffloadBinary.cpp
M llvm/lib/TargetParser/AMDGPUTargetParser.cpp
M llvm/unittests/TargetParser/TargetParserTest.cpp
Log Message:
-----------
Fix device-image over-merge duplicating symbols in linker wrapper
Co-authored-by: Claude (Opus 4.8)
Compare: https://github.com/llvm/llvm-project/compare/3e2973c5c004%5E...54046206f7d8
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