[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 03:39:59 PDT 2025


https://github.com/frasercrmck commented:

I think this makes sense. I can't say for sure that `opt` does absolutely nothing when passed no arguments but logically it makes sense.

As for how targets are organized, I wonder if conditionally providing targets adds more complexity, both for the codebase and for developers as users. Another option would be to unconditionally have `builtin.opt` targets but if no flags are passed, just make them empty targets that rely only on `builtin.link` targets. That way developers can consistently build `builtin.opt` targets without wondering why it says "no such target" or whatever. Just a thought.

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


More information about the cfe-commits mailing list