[Mesa-dev] clover's interface to clang

Dave Airlie airlied at gmail.com
Thu Nov 12 04:40:10 UTC 2020


On Thu, 12 Nov 2020 at 06:37, Dave Airlie <airlied at gmail.com> wrote:
>
> On Thu, 12 Nov 2020 at 06:23, Francisco Jerez <currojerez at riseup.net> wrote:
> >
> > 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.
>
> Currently we pass a bunch of options from the user directly to the
> clang cc1 internals. Up until recently this wasn't a problem as the
> cc1 just happened to allow this and the options matched up. But this
> was only ever a happy accident.
>
> Now the options don't match up. What you are meant to do is pass the
> options to the clang Driver and it gives you back a cc1 job which has
> the cc1 specific arguments for what you passed to the driver.
>
> So Driver sees "-cl-denorms-are-zero" and gives us back a compilation
> job for cc1 which has some internal -f flags in it.
>
> Otherwise clover has to keep track of the internal cc1 flags and remap
> things itself which might not be easily discoverable moving forward.

I hacked a bit of a PoC up today for this
https://gitlab.freedesktop.org/airlied/mesa/-/commit/0981cd24ae6653ef058cbcbb5465f65d0cfdae65

Will try and make it better.

Dave.


More information about the mesa-dev mailing list