[Mesa-dev] clover's interface to clang
airlied at gmail.com
Wed Nov 11 04:14:31 UTC 2020
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.
More information about the mesa-dev