Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

HerrCai0907
Copy link
Contributor

reapply #131804 and #159289
Fixed cmake link issue.

DeNiCoN and others added 30 commits March 17, 2025 08:06
This reverts commit a686695.
@HerrCai0907
Copy link
Contributor Author

HerrCai0907 commented Sep 18, 2025

@ingomueller-net could you kindly review this PR. I think I have fixed build issue but since I cannot reproduce it locally. I am not 100% sure it can work. Fix commit: 296eea3

Copy link
Contributor

@ingomueller-net ingomueller-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to build clangTidy in my set-up, so it seems to work now. Approval for that aspect.

Copy link
Contributor

@ingomueller-net ingomueller-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, spoke too soon. Building clang-tidy still has a lot of problems. The first one is the following but there are too many to copy them here.

ld.lld: error: undefined symbol: clang::ast_matchers::MatchFinder::addDynamicMatcher(clang::ast_matchers::internal::DynTypedMatcher const&, clang::ast_matchers::MatchFinder::MatchCallback*)
>>> referenced by QueryCheck.cpp:123 (/usr/local/google/home/ingomueller/git/llvm-project/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp:123)
>>>               tools/clang/tools/extra/clang-tidy/custom/CMakeFiles/obj.clangTidyCustomModule.dir/QueryCheck.cpp.o:(clang::tidy::custom::QueryCheck::registerMatchers(clang::ast_matchers::MatchFinder*))

Did you try to build with BUILD_SHARED_LIB?

@HerrCai0907
Copy link
Contributor Author

I found how to reproduce it. Build failed happened in ubuntu with cmake -S llvm -B build/release-gcc-shared -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=1 -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_TARGETS_TO_BUILD="X86".
Neither mac + clang nor ubuntu + clang can be reproduced.

@HerrCai0907
Copy link
Contributor Author

I think it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants