<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
</div></div>Maybe I'm the only one who finds it horrible to override -march from<br>
within project build systems.  It causes no end of problems with LTO,<br>
and results in objects being built inappropriately for the target as<br>
specified by the builder.<br></blockquote><br></div><div class="gmail_quote">In general I would agree, yes, but I think swr is a somewhat unique situation.  The march flags don't apply to the entire build but only to libswr.  It's built as two separate libraries, one with AVX and the other with AVX2, which the swr driver determines at runtime which to load.  As odd as it may seem to do so, it makes sense for the current primary use case for swr which is in HPC environments where the front end and service nodes are often a different (older usually) architecture than the actual back end compute nodes.  This lets you build a Mesa that can target both optimally in a single build.<br><br></div><div class="gmail_quote">I'm not necessarily arguing that it's the optimal way to achieve this (it may be, I'm not sure), but it's certainly a reasonable approach.<br></div><br></div></div>