-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
There was some discussion of this issue between @SebastianBoe and me in #5140 and #5142 , and as those tickets are particular cases, and the discussion is far from complete, I'd like to create this ticket for wider and longer discussion.
So, idea I'd like to convey is that original Kbuild based systems consisted (at least) of the following, pretty distinct parts:
- Build system per se, which compiled sources into binaries.
- "Work with"/test/debug system, e.g. "make run", "make gdbserver", etc.
Some aspects of p.2 were controlled with make variables, e.g. one could say "make run QEMU_PTY=1" to run just this qemu invocation via pseudo-tty.
During CMake conversion, it seems that (almost?) all variables which controlled p.2 behavior were converted into CMake variables, which of course change workflow relying on those vars adversely, making there usage rather inconvenient.
The obvious solution is to convert them back into make variables, like they were originally, and how people expected to use them.
Two following counter-arguments were raised/can be imagined to be raised:
a) Due to @SebastianBoe: "But we want IDE integration..."
b) Was used on a different occasion by @mbolivar, so I guess could be raised here too: "But CMake can generate for Ninja and other build systems..."
My response to both is the same: Folks, when you want to use IDE, when you want to use Ninja, you want to use p.1 of the above, the "build system" part of Zephyr's control environment. p.2 is outside of your control, sorry. It innately and natively targeted at unix shell, make, and other command-line, specific tools. If you want to build p.2 for another tools, you'll likely need to work out a solution for that particular tool (a specific IDE, a specific make alternative). It might be that you could reuse some parts of unix command line p.2, but even you can't be sure for now, quoting @SebastianBoe #5142 (comment) "I can't be more specific than that because we haven't yet figured out how this will work, that will come after CMake has stabilized and Windows support has improved."
In the meantime, command-line and make using people just want their productive workflow, which was disrupted by CMake migration, back. And my argument is that converting as much as possible p.2-related vars from CMake to make is a reasonable and viable approach.
This is of course just RFC, representing my partial and biased opinion. I'd like to invite all interested parties to share their outlook, so we all understand where we're heading, and in via which ways.
Thanks.