For the target features in the same priority, make sure it is not a random mangling name.
Do you have a test-case where they were out of order? Or is that dependent on the C++ library?
I think I just moved this code from elsewhere when I changed it, but it sounds like a sensible change to me.
Thanks for the review.
I'm working on RISC-V FMV support, and we found the large set of extension features is hard to maintain the priority that doesn't collision at all.
Lack the appropriate priority, it will generate the random mangling name. The predictable mangling name is convenient for testing.
This goal could also be achieved by giving the serial number for each feature, but I think the stable sort approach is simpler.