[all-commits] [llvm/llvm-project] cc2b43: [Clang][Cmake] fix libtool duplicate member name w...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Mon Mar 31 11:21:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc2b4326142e6df6755472edaf264a0af4fe599a
      https://github.com/llvm/llvm-project/commit/cc2b4326142e6df6755472edaf264a0af4fe599a
  Author: Farzon Lotfi <farzonlotfi at microsoft.com>
  Date:   2025-03-31 (Mon, 31 Mar 2025)

  Changed paths:
    M clang/lib/CodeGen/CMakeLists.txt
    M clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
    A clang/lib/CodeGen/TargetBuiltins/CMakeLists.txt
    A clang/lib/CodeGen/Targets/CMakeLists.txt

  Log Message:
  -----------
  [Clang][Cmake] fix libtool duplicate member name warnings (#133619)

fixes #133199
 
PR #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 is to seperate the cmake files into their own sub
directories. I chose to create static libraries. It might of been
possible to build an OBJECT, but I only saw examples of this in
compiler-rt and test directories so assumed there was a reason it wasn't
used.



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