Issue 178302
Summary [main] Linker error while building unit tests for Clang: `DirectoryWatcherTest`
Labels clang
Assignees
Reporter hamidelmaazouz
    ```
ld.lld: error: undefined symbol: clang::DirectoryWatcher::create(llvm::StringRef, std::function<void (llvm::ArrayRef<clang::DirectoryWatcher::Event>, bool)>, bool)
>>> referenced by DirectoryWatcherTest.cpp:486 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:486)
>>> tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_InvalidatedWatcherAsync_Test::TestBody())
>>> referenced by DirectoryWatcherTest.cpp:450 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:450)
>>> tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_InvalidatedWatcher_Test::TestBody())
>>> referenced by DirectoryWatcherTest.cpp:428 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:428)
>>> tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_DeleteWatchedDir_Test::TestBody())
>>> referenced 5 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```

Build settings:

[CMakeUserPresets.json](https://github.com/user-attachments/files/24895154/CMakeUserPresets.json)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to