These are needed to avoid undefined symbols which aren't satisfied
by Clang itself.
Details
Details
- Reviewers
hintonda vitalybuka Szelethus - Commits
- rZORGee5efac3691f: [Analysis] Link library dependencies to Analysis plugins
rGee5efac3691f: [Analysis] Link library dependencies to Analysis plugins
rGc87a45d471cb: [Analysis] Link library dependencies to Analysis plugins
rL361340: [Analysis] Link library dependencies to Analysis plugins
rC361340: [Analysis] Link library dependencies to Analysis plugins
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
Comment Actions
This is an alternative to D62154. With just the change to HandleLLVMOptions.cmake, we're seeing errors in Analysis plugins due to undefined symbols:
error: 'error' diagnostics seen but not expected: (frontend): unable to load plugin './lib/SampleAnalyzerPlugin.so': './lib/SampleAnalyzerPlugin.so: undefined symbol: _ZN4llvm14FoldingSetBase6anchorEv'
and
bin/clang: symbol lookup error: ./lib/SampleAnalyzerPlugin.so: undefined symbol: _ZN5clang4ento15CheckerRegistry10addCheckerEPFvRNS0_14CheckerManagerEEPFbRKNS_11LangOptionsEEN4llvm9StringRefESC_SC_b
I'm not sure where those symbols are supposed to come from, but they're not part of Clang so those errors seem valid. Linking in dependencies unconditionally addresses those failures.
Note that I've been testing this in build of Clang that enables neither shared libraries nor libLLVM.so.
Comment Actions
This breaks non-PIC builds. Was this planned or expected? Can we revert this until a fix is found?