Cross compilation by default #10904
-
Hi! I'm looking into replacing CMake with Meson for an embedded project that always cross-compiles using arm-none-eabi toolchain. As there is a lot of platform specific code, there is little chance of it working on another platform. I currently set toolchain file in CMake by default, so I don't have to specify it each time. I prefer the project builds with a simple Any advice is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If nothing else, you can do if not meson.is_cross_build()
error('must be invoked with "meson setup--cross-file=./toolchain.ini" or via meson-wrapper.sh')
endif This does make it impossible for devs to overlook the script. I don't know off the top of my head if this is otherwise possible, unless maybe you can specify a cross file in default_options? Haven't tried it. |
Beta Was this translation helpful? Give feedback.
If nothing else, you can do
This does make it impossible for devs to overlook the script.
I don't know off the top of my head if this is otherwise possible, unless maybe you can specify a cross file in default_options? Haven't tried it.