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
Subprojects can only be built for the host machine #11121
Comments
It would be nice to maybe use this time to come up with something much easier to understand than Every time I deal with But maybe now is not the time since I know @dcbaker has had some qualms about the way machines are currently done given what systemd has to deal with. |
It is definitely not going to yield an array of subprojects. |
Good point. Maybe |
I had thought about having |
or possibly |
Are you using 'build' and 'host' so someone doesn't supply target_machine? |
among other things, yes. but also 'both' is more ergonomic than |
Your proposal seems reasonable. |
It is not currently possible to build a meson subproject for the build system. Since xdgmime is only used for the tests we can move this logic into the build-tests conditional and disables building the tests when cross-compiling. This workaround is not ideal but it's better than not being able to cross-compile at all. See mesonbuild/meson#11121
Discussed in #11120
Originally posted by LunarLambda November 30, 2022
Project A can be cross-compiled (it's a library for command-line parsing), so does not specify
native: true
.Project B must be cross-compiled (single-platform embedded project), but wants to use Project A as a subproject dependency for
native: true
executables.Is there any way for Project B to tell meson it should build Project A using the native compiler?
Or would Project A need to expose a custom build option (i.e.
-Dnative=true
), or would it need to expose two dependencies (one cross, one native)Something like
subproject(..., native: true)
would be nice, however I can see this clashing with the rule of "every subproject is executed only once", as well as fallback subprojects used with wraps.The text was updated successfully, but these errors were encountered: