-
Notifications
You must be signed in to change notification settings - Fork 184
Compiling on Windows using flang natively. #978
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
Comments
There is also this:
The first two I know from C++ and clang on windows. They are due to the compiler runtime from the compiler not being linked(instead it links the msvc provided one with clang). Not sure how it would work here as flang uses a different runtime, not compiler-rt afaik. The lib to link with clang to work around these is clang_rt.builtins.yourarch.lib; but I don't see a different builtins lib for flang. For the last symbol, I don't see it in the fortran runtime from flang so I assume it is not supported yet. However, this error being here is a bit weird as cmake did check for real128 and fail, so I think this should not be being included? |
Looks like flang is getting stuck with extended precision support, I have zero experience with this compiler so can't really say much about the error messages. Have you tried building without extended precision support? |
That's what I meant by the last part. The check for real128 failed so I thought extended precision support would be off. I'll try tomorrow. |
real128 corresponds to quadruple precision (qp), the extended precision is in-between double and quadruple. Would seem like somehow in the building process it passes. I would say check indeed forcing |
Ah. Ok so like long double potentially being there. The 80bit float type. |
The amount of errors that gets thrown (mostly repeated, but they make it unreadable) makes me think that this compiler just isn't there yet. At least not on windows. Running llvm version 20.1.0. Doing a build without the missing float types did show an interesting new error though:
I guess it's a compiler bug. |
I was actually surprised of this issue being opened as, as of now, my understanding from flang's documentation is that it should not be seen as a production-ready compiler https://flang.llvm.org/docs/
Is your objective using flang? or just building for windows? if so, intel compilers can be used or GNU compilers from equation.com https://www.equation.com/servlet/equation.cmd?fa=fortran can also be used on Windows. Conda also enables installing gcc/fortran. |
My objective was seeing how far along flang is. I opened the issue thinking it may be something about the build config not playing nicely, but it looks like the compiler just needs more work. |
I think flang developers would appreciate being alerted of these issues, maybe they could use it to check for missing features? If that's ok, I think this issue can be closed as it doesn't seem to be an issue with stdlib but the compiler. |
Indeed. |
I tried compiling natively (as in not mingw or msys2) and hit a few issues.
First one was a missing module file (maybe the build graph was wrong?) but running ninja with -k0 it didn't seem to show up again(though with the amount of output I might have missed it. specialfunctions_legendre was trying to be built before specialfunctions.mod existed. As after a clean I didn't hit it again, it seems non deterministic probably due to the parallel build.
Second one is:
It appears as though a lot (or all?) math functions are non-constant. atan2 log and probably others also say cannot be folded on host.
third one:
The text was updated successfully, but these errors were encountered: