I think Arm engineers have their plan of implementing code models. Such an option essentially creates a new code model variant and requires more thoughts. Compiler driver option parity is great, and such extensions should be discussed with GCC as well.
On the patch side, translating a driver option to a cl::opt
is hack. Some existing features use this because it is easy, but for new stuff we should implement them properly. Certain features are implement as TargetOptions (e.g. -ffunction-sections
) and some are implemented as function attributes, depending on whether fine-grained control under LTO is useful.