<div dir="ltr"><div>Thanks for organizing the discussion and summarizing it. I haven't been involved, but it all seems like it's going in the right direction.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 29, 2019 at 10:10 AM Chris Bieneman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>There are also problems related to cross-runtime dependencies which have come up recently. Some of these problems can be addressed more cleanly with modern CMake generator expressions, and other issues may require a larger restructuring of code. For years there have been discussions thrown around about breaking the builtins libraries out of compiler-rt. Maybe now is the time to consider doing that.</div></div></blockquote><div><br></div><div>Why split out builtins from compiler-rt? They were the original compiler runtime library. Should we go the other direction instead? For a long time, I've wondered if we should have split the sanitizer runtimes out of compiler-rt. GCC maintains a forked copy of some of the sanitizer runtimes in a libsanitizer subdirectory next to libgcc:</div><div><a href="https://github.com/gcc-mirror/gcc/tree/master/libsanitizer">https://github.com/gcc-mirror/gcc/tree/master/libsanitizer</a></div><div>I think we put the sanitizers in compiler-rt mainly because it is a "compiler runtime", a runtime to which the compiler generates calls, but the same applies to libcxxabi, OpenMP, I assume libcl, and other things. The sanitizers are the biggest piece of compiler-rt by far, so maybe they deserve their own top level directory.</div><div><br></div><div>Here are the contents of compiler-rt/lib, with my categorizations:</div><div><br></div><div>Platform building blocks:<br>- crt<br>- builtins<br>- BlocksRuntime<br><br>Instrumentation tools:<br>- profile<br>- xray<br><br>Sanitizer or security things:<br>- cfi<br>- asan<br>- tsan<br>- ubsan<br>- ubsan_minimal<br>- dfsan<br>- fuzzer<br>- gwp_asan<br>- hwasan<br>- interception<br>- lsan<br>- msan<br>- safestack<br>- sanitizer_common<br>- stats<br>- scudo</div><div><br></div><div>---</div><div><br></div><div>All of the above said, I don't see any particularly strong reasons to change anything at the moment, but maybe you have a good reason to separate builtins and instrumentation that I haven't thought of.</div></div></div>