<div dir="ltr">Isn't ShadowCallStack a MachineFunctionPass? Machine IR doesn't use the new PM yet.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 10:30 AM Leonard Chan via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I'm in the process of trying to port ShadowCallStack from the legacy<br>
pass manager to the new one. I ran into an issue though where it seems<br>
I cannot link against anything I added in ShadowCallStack.cpp when<br>
trying to build c-index-test (via just running ninja check-all). I<br>
think the reason for this is because nothing under lib/Target/X86/ is<br>
a part of any library compiled with c-index-test (if I'm reading the<br>
CMake correctly). I imagine this would also mean I wouldn't be able to<br>
successfully build other binaries like clang.<br>
<br>
What I want to know is if there is a proper way to link against code<br>
under lib/Target/X86/ (as a part of some shared library or through<br>
some other means) such that i could use it with the new pass manager.<br>
<br>
These are some other thoughts I had attempting to find a possible solution:<br>
- I could not find an instance of classes under lib/Target/X86/ (or<br>
any other target for that matter) that are used or exposed by anything<br>
outside of lib/Target/<br>
- The only things that seem exposed under lib/Target/ are a few files<br>
packed into libLLVMTarget.a and none of it is linked against source<br>
files under llvm/Target/<TARGET><br>
- If ShadowCallStack is meant to be a pass that should eventually work<br>
for any target, at some point it could be pulled out from the X86<br>
directory and also be included in libLLVMTarget.a, but I'm not sure<br>
how the CMake dependency hierarchy would support this.<br>
<br>
Thanks,<br>
Leonard<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>