[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

Balint Cristian via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 16 16:28:46 PDT 2023


cbalint13 wrote:

@DavidSpickett ,

This PR list all flags for a specific target.

---

Additionally, beyond this PR:

* We can limit to list flags only for a desired e.g. -mcpu=XYZ, e.g. the user can query like:
```./bin/clang -target x86_64-linux-gnu -mcpu=sandybridge --print-supported-extensions```

* The cost for this would be simply iterating through ```MCInfo->checkFeatures()``` for a specific ```-mcpu```.

Let me know if it would be interesting future, I'll be happy doing it in a subsecvent PR.

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


More information about the cfe-commits mailing list