[Mesa-dev] clover's interface to clang
Dave Airlie
airlied at gmail.com
Wed Nov 11 20:37:51 UTC 2020
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.
Dave.
More information about the mesa-dev
mailing list