<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 16, 2018 at 6:26 PM, Titus Winters <span dir="ltr"><<a href="mailto:titus@google.com" target="_blank">titus@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here's a concrete example of why the preprocessor matters deeply in this discussion.<div><br></div><div>If we build from source, we have to handle the (all too common) situation where a given library has an arbitrary set of build inputs (-D flags, compiler flags, etc). If those aren't compatible, that'll be a problem.</div><div><br></div><div>If we force them to all be the same, then we have to worry about providing a mechanism to specify which flags (from an unbounded list) are required / compatible with a given library. That's hard to extract from source.</div><div><br></div><div>If we instead allow each library to be built from different compiler invocations, we risk ODR. Keep in mind that even something as simple as an assert() in a header is an ODR violation if we don't enforce consistent build flags: building that header with one definition of NDEBUG in one TU results in a different definition than one built without NDEBUG in another TU. </div></div></blockquote><div><br></div><div>Indeed ODR is a concern. But even with that concern we somehow manage today. Again, how much do we want to prevent such concerns?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>In all honesty, the preprocessor and consistent build invocation is possibly the hard part. If we come to agreement on those points, relying on existing package management solutions probably suffices.</div></div></blockquote><div><br></div><div>Yes, indeed. And that's the first thing I want to tackle. I want to tackle it by standardizing compiler invocations. This is not some fanciful idea either.. It's what we've been doing with Boost Build for more than a decade by abstracting the compiler flags to portable features. Some other build systems, like cmake, do similar abstractions to some varied degrees. </div></div><br clear="all"><div><br></div>-- <br><div class="m_344941836276042015gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">-- Rene Rivera<br>-- Grafik - Don't Assume Anything<br>-- Robot Dreams - <a href="http://robot-dreams.net/" target="_blank">http://robot-dreams.net</a><br><br></div></div></div></div>
</div></div>