[Mesa-stable] [Mesa-dev] [PATCH] swr: fix -march flag for AVX

Chuck Atkins chuck.atkins at kitware.com
Mon Jun 13 13:03:06 UTC 2016


>
> Maybe I'm the only one who finds it horrible to override -march from
> within project build systems.  It causes no end of problems with LTO,
> and results in objects being built inappropriately for the target as
> specified by the builder.
>

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.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20160613/cd1371f2/attachment.html>


More information about the mesa-stable mailing list