how to specify --native-file and --cross-file for subprojectcs? #12602
-
|
My project consists of multiple subprojects. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
That's not possible, the toolchain is global and not per subproject. You have to build them separately. |
Beta Was this translation helpful? Give feedback.
-
|
The only real clean way to do this is to wrap your build setup in a root Makefile or some other script to call all the other meson.build files per project. |
Beta Was this translation helpful? Give feedback.
You can specify both native files and cross files for the top level project. It will mean that all subprojects also have both a native file and a cross file.
Subprojects that use cross targets will use the cross compiler, subprojects that use native targets will use the native compiler. What meson doesn't allow is using multiple native compilers in a single build (or multiple cross compilers, although that one is something we should implement as a new feature for cases where you are targeting multiple cross architectures. For example, QEMU needs this.)