llvm / llvm/offload-test-suite

Build warning on mac about duplicate member names.

Open
#718 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18
Forks
39
Avg merge
2d 18h
Merged PRs (30d)
40

Description

Seeing this warning

```
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning duplicate member name 'Device.cpp.o' from 'tools/OffloadTest/lib/API/CMakeFiles/OffloadTestAPI.dir/Device.cpp.o(Device.cpp.o)' and 'tools/OffloadTest/lib/API/CMakeFiles/OffloadTestAPI.dir/VK/Device.cpp.o(Device.cpp.o)'
```

Doesn't appear to cause any runtime problems. Seems like the issue is because the Device.cpps are all in the same CmakeFile. If we seperate the cmake files into their own sub directories as static libs. instead of putting them all in `lib/API/CMakeLists.txt` This issue goes away.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tools/OffloadTest/lib/API/CMakeLists.txt and inspect how the Device.cpp and VK/Device.cpp sources are combined into the static library. Reproduce the macOS build and verify that restructuring the CMake targets removes the duplicate member-name warning without introducing runtime or build regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.