-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify interface to query supported option for extension #24
Comments
The toolchain conventions describe the expected behavior of RISC-V toolchains (or their components). So if we streamline an interface like this, we should probably put it in a "preferred, but not widely available CLI flags" section. |
Yeah, sounds good, my goal is support that at least on clang, gcc and GNU as. |
In the RISC-V LLVM meeting @compnerd raised the point that clang has a way of listing supported targets already, and an alternative might be to just modify that to list the supported extensions. There was also a concern that -march is currently documented to be an ISA string. On the other hand, it feels to me like changing behaviour on an invalid ISA string (in this case, |
Regarding the comment from @compnerd: Is What about other flags like |
I think that we could just list the available extensions in
Neither of these require querying, and the possible inputs are well documented at https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html#RISC-V-Options. The difference with |
The list of accepted values for both |
And Clang/LLVM doesn't support ILP32E right now, but we expect it will in the future. |
Sure, it can be extended in the future. However, given that the premise for the new support was "we do not know what value values are" which was clarified to "we do not know what the compiler supports without checking", I think that just listing them in the |
And |
I would prefer adding
|
I've raised this topic in the Clang Discourse to see if there are any strong views one way or another for adding more |
We've
-mtune=?
and-mcpu=?
in clang to query supported option for those options, but we are lacking a interface to query supported extension for RISC-V, the only way is checking the release note or read the source code, which is not user friendly way.So I think we might need to add something like
-march=?
to print out all supported extension and supported version, and would be great to having consistent interface and output, so that user could have easier to write some script to parse.-march=?
The text was updated successfully, but these errors were encountered: