-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Don't require a native compiler when doing only cross-compilation #2392
Comments
confirmed. On the machine it was failing on, I installed mingw and now the meson command is working. |
Meson requires that you have both a native compiler and a cross compiler available when doing cross compilations. |
Hmm, that means I have to get windows people to install mingw to use the xilinx cross compiler? I can't imagine that's going to go over well... maybe I can set the Is there a particular reason why a native compiler is required? |
Most of them have to do with laziness. The implementation code is a lot simpler if it can always assume that the native compiler exists and is usable. We don't have to have special checking code when people do That being said we could probably accept a patch to fix this assuming it does not complicate the internals too much. |
The error message should also definitely be improved to explicitly state what's missing. |
I looked into this a bit, as having this would simplify adding cross ARM MSVC to CI. This looks doable, but I think that we will need to extend the meson language so it's possible to say if a native compiler is required or not. e.g.
|
An alternative approach is not to add a keyword but just try to look up the compilers and if they are not found, then ignore them and later if the build definition tries to build a native target, exit with a hard error. |
Yeah, I looked into doing it lazily, but as well as being a lot more work, there is at least one more problem:
|
After #4010, it will be really really really easy. (I was planning on doing this / |
Is there now a way to disable the native compiler? If so, how does it work? |
It wasn't in #4010, but is easy to do now that it's merged. I have some regressions to fix before new features, but I'll help anyone else start this sooner. |
Well, I must be dumb because it involved a lot of work, but I have made an attempt at this in #6512.
I took the simple approach of always declaring what languages are used for what machine. It's certainly possible to do this lazily as a refinement, but there are multiple points where the interpreter wants information from the compiler object, which are not well surfaced at the moment. |
in interpeter.py: 2790:
An error occurred in detect_compiler_for, and the Execption part will not be executed |
I have a windows machine with the latest
.msi
installed - version0.42.1
.I set my path like this:
This is my cross file (I've tried also tried full paths but it makes no difference:
Meson prints this error:
What's interesting is that on another windows machine, I do have
clang
andgcc
in the path and this exact same command works perfectly.The text was updated successfully, but these errors were encountered: