Closed adrianherrera closed 1 year ago
What is the preferred solution to this? My preferred solution is to change PAPass from a MODULE library to a SHARED library. This way it can be used with both opt and linked with other programs.
I'm a complete CMake novice, all of this was hacked together to work enough for MATE :see_no_evil: I'd trust your judgment, please feel free to open a PR if there's a better way of doing things that would still work for MATE!
Sweeet, done!
Hi folks,
I'm trying to write my own program that uses the
PointerAnalysis
pass. However, it currently fails when I try to use the new pass manager (as opposed to the legacy pass manager) because there is anundefined reference to 'cclyzer::PointerAnalysis::Key'
. The problem is that thePAPassInterface
library does not compile any sources (per here) andcclyzer::PointerAnalysis::Key
is in a source file. Separately, I cannot specifyPAPass
in my CMake file'starget_link_libraries
because it is aMODULE
and thus cannot be linked against (CMake produces the error:What is the preferred solution to this? My preferred solution is to change
PAPass
from aMODULE
library to aSHARED
library. This way it can be used with bothopt
and linked with other programs.BTW, this doesn't appear to affect the legacy pass manager (I looked here to see how it was done in MATE).