<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 31, 2014, at 2:07 PM, Chris Bieneman <<a href="mailto:beanz@apple.com" class="">beanz@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I was thinking of moving the files into a Tools subdirectory of Support, and having a new library generated from that. Does that mesh with what you’d like to see?<div class=""><br class=""></div><div class="">I’ve gotten wrapped into a nasty internal bug hunt, so I probably won’t have patches until next week. I will also probably need to ask Eric for help with the autoconf side of things because my familiarity with autoconf ends at “run configure”.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 31, 2014, at 1:46 PM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I'm in favor of splitting the code out into a new directory and using separate libraries if we're going to do this.<div class=""><br class=""></div><div class="">Build systems should be really dumb, IMO.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Oct 30, 2014 at 6:46 PM, Eric Christopher <span dir="ltr" class=""><<a href="mailto:echristo@gmail.com" target="_blank" class="">echristo@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+1 to this.<br class=""><br class="">I'd slightly prefer a separate library (though moving the code vs not moving the code I'm relatively apathetic about), but just because I hate conditional compilation.<span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">-eric</div></font></span><div class="HOEnZb"><div class="h5"><br class=""><div class="gmail_quote">On Thu Oct 30 2014 at 5:55:59 PM Juergen Ributzka <<a href="mailto:juergen@apple.com" target="_blank" class="">juergen@apple.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">I am mostly impartial to the two proposed solutions (separate library or conditional compilation of the hooks into the tools). If we make it a library I think we should make it a convenience library that is intended to be used only with the tools and not an external supported library at all.</div></div><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">-Juergen</div></div><div style="word-wrap:break-word" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 20, 2014, at 1:02 PM, Chris Bieneman <<a href="mailto:beanz@apple.com" target="_blank" class="">beanz@apple.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class="">There is no real technical requirement for this. Currently we work around the signal handlers by building with ENABLE_CRASH_OVERRIDES=NO, and carrying along the command line parsing code and ToolOutputFile isn’t really a big drain.<div class=""><br class=""></div><div class="">This seemed to me like the cleanest way to accomplish a goal of mine. The goal I have is to be able to build an LLVM dylib and llc/opt/etc from the same CMake invocation where the dylib does not have crash overrides and signal handler hooks, but the tools do.</div><div class=""><br class=""></div><div class="">There are other ways to accomplish this, but I felt that separating libLLVMSupport into two libraries seemed the cleanest. An alternate approach that could work for me would be to have the implementation of the hooks only be compiled into the tools.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 20, 2014, at 12:57 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank" class="">chandlerc@google.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">The question I have is -- does the actual source code need to move? I'm wondering what aspects require a new library as opposed to different sequence of things happening when initializing LLVM as a library vs. as a tool.<div class=""><br class=""></div><div class="">(We've definitely had trouble with the signal handlers ourselves, but I thought we had solved it by using different code paths to set everything else up...)</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Oct 20, 2014 at 12:46 PM, Chris Bieneman <span dir="ltr" class=""><<a href="mailto:beanz@apple.com" target="_blank" class="">beanz@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are some pieces of functionality in LLVM today, that make sense for tools like llc, opt, clang, but they aren't relevant for embedded uses like LLVM in the JavaScript JIT. One example of this type of functionality is the signal handlers.<br class="">
<br class="">
I'd like to propose migrating content that is specifically designed for tools into a new ToolsSupport library. My initial candidates for the new library would be; anything guarded by ENABLE_CRASH_OVERRIDES, and any functionality specific to tools (i.e. ToolOutputFile and eventually command line parsing— once it can be factored out).<br class="">
<br class="">
The primary goal of this is to make it easy for uses of LLVM that aren't command line tools to not include functionality that isn't required for that use case.<br class="">
<br class="">
Thoughts?<br class="">
<br class="">
-Chris<br class="">
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></div>______________________________<u class=""></u>_________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="">http://lists.cs.uiuc.edu/<u class=""></u>mailman/listinfo/llvmdev</a><br class="">
</blockquote></div>
</div></div><br class="">_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></div></div></body></html>