link errors when llvm is built statically
- Dominant language
- C
- Stars
- 140
- Forks
- 92
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 7
Description
Lots of undefined references. Libraries that are being linked:
`
-lclangBasic -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangCodeGen -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangFrontend -lclangDriver -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -lclangBasic -ldl -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -ldl && :`
LINK_COMPONENTS=all in CMakeLists.txt fails to get all the LLVM libraries to link. Works if I add LLVM_AVAILABLE_LIBS.
Contributor guide
Research direction
Start in CMakeLists.txt and inspect how LINK_COMPONENTS=all determines the LLVM libraries for static builds. Reproduce the link failure with LLVM built statically, then compare the generated link libraries with the LLVM_AVAILABLE_LIBS workaround. Done means the static configuration links without manually adding that library list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100