[all-commits] [llvm/llvm-project] 0d71d9: Reland [Clang][Cmake] fix libtool duplicate member...
Farzon Lotfi via All-commits
all-commits at lists.llvm.org
Mon Apr 7 06:53:29 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d71d9ab28d626e85a0085a50ff634f76a950ce0
https://github.com/llvm/llvm-project/commit/0d71d9ab28d626e85a0085a50ff634f76a950ce0
Author: Farzon Lotfi <farzonlotfi at microsoft.com>
Date: 2025-04-07 (Mon, 07 Apr 2025)
Changed paths:
M clang/lib/CodeGen/CMakeLists.txt
R clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp
M clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
A clang/lib/CodeGen/TargetBuiltins/CMakeLists.txt
A clang/lib/CodeGen/Targets/CMakeLists.txt
A clang/lib/CodeGen/Targets/HLSLBufferLayoutBuilder.cpp
Log Message:
-----------
Reland [Clang][Cmake] fix libtool duplicate member name warnings (#133850)
fixes https://github.com/llvm/llvm-project/issues/133199
As of the third commit the fix to the linker missing references in
`Targets/DirectX.cpp` found in
https://github.com/llvm/llvm-project/pull/133776 was fixed by moving
`HLSLBufferLayoutBuilder.cpp` to `clang/lib/CodeGen/Targets/`.
It fixes the circular reference issue found in
https://github.com/llvm/llvm-project/pull/133619 for all
`-DBUILD_SHARED_LIBS=ON` builds by removing `target_link_libraries` from
the sub directory cmake files.
testing for amdgpu offload was done via
`cmake -B ../llvm_amdgpu -S llvm -GNinja -C
offload/cmake/caches/Offload.cmake -DCMAKE_BUILD_TYPE=Release`
PR https://github.com/llvm/llvm-project/pull/132252 Created a second
file that shared <TargetName>.cpp in clang/lib/CodeGen/CMakeLists.txt
For example There were two AMDGPU.cpp's one in TargetBuiltins and the
other in Targets. Even though these were in different directories
libtool warns that it might not distinguish them because they share the
same base name.
There are two potential fixes. The easy fix is to rename one of them and
keep one cmake file. That solution though doesn't future proof this
problem in the event of a third <TargetName>.cpp and it seems teams want
to just use the target name
https://github.com/llvm/llvm-project/pull/132252#issuecomment-2758178483.
The alternative fix that this PR went with is to seperate the cmake
files into their own sub directories as static libs.
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