[llvm] [SPIR-V] Fix parsing of command line options for the SPIR-V Backend API call (PR #124653)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 03:21:09 PST 2025


nikic wrote:

> > > @michalpaszkowski @nikic It's a temporary fix, in a sense that I should expect it immediately resolves the problem with builds. However, I'm going to refactor this part of the API soon to get rid of cl::ParseCommandLineOptions entirely. This needs time though, so let's decide which of two temporary fixes is better: (1) the one from this PR, or (2) disabling entirely unit tests from unittests/Target/SPIRV/SPIRVAPITest.cpp until we remove cl::ParseCommandLineOptions from the SPIR-V Backend API.
> > 
> > 
> > Is it possible to completely remove this function for the LLVM 20 release and then reintroduce it later with a redesigned API?
> 
> It would be nice if we can avoid this. There is a couple of products that relies on the presence of the API already. Redesign & changing of contract is not a problem for them, but to remove the API function entirely breaks things badly. I'd propose to either apply this PR as a quick remediation of random build errors if it's an urgent situation, or to wait for a couple of days until a redesigned API is available for review. What you think?

Is it possible to replace Opts with CodeGenOptLevel and Triple arguments as a quick fix, and then followup with whatever general API design you have in mind?

https://github.com/llvm/llvm-project/pull/124653


More information about the llvm-commits mailing list