[Mesa-dev] clover's interface to clang

Francisco Jerez currojerez at riseup.net
Wed Nov 11 20:22:36 UTC 2020


I don't remember the specifics of why we ended up interfacing with Clang
this way.  What is technically wrong with it, specifically?  I don't
have any objection to switching to the Driver and Compilation interface,
nor to translating the "-cl-denorms-are-zero" option to whatever the
current option name is so the current Clang interfacing keeps working.

Dave Airlie <airlied at gmail.com> writes:

> Hey all (mostly Tom).
>
> I've been learning new things today since Matt pushed a patch to clang
> to remove "-cl-denorms-are-zero" from cc1 options. I thought this was
> a regression or we should hack things to pass a different flag (which
> I did locally for testing), but Matt informed me clover is likely
> interfacing to clang wrong.
>
> The correct way to do things seems to be to build up a set of command
> line args pass those to the Driver, create a Compilation object, with
> jobs, and then execute each job in turns, one of the jobs would be a
> cc1 job and the driver would have all the correct arguments for it.
>
> Now I'll likely dig into this a bit more, but I was wondering if
> anyone knows historically why this wasn't done. I know for example
> with clover we really only want to use a the cc1 pass since at least
> for the NIR backend we just want to emit LLVM bytecode and pass it to
> the spirv conversion, so using the driver might be overkill.
>
> Dave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20201111/b3b0c550/attachment.sig>


More information about the mesa-dev mailing list