Search code examples
yoctobitbake

What is the difference between do_compile[noexec] and empty function in bitbake recipe?


If I want to disable a particular build step, I can use either of these:

do_configure[noexec] = "1"

OR

do_configure() {
}

What is the difference between these alternatives? I have heard there can be raise conditions when using noexec.


Solution

  • Well, there's normally 3 ways of removing a task:

    1. deltask This completely removes the task and also it's dependencies. Thus, the tasks that might depend on the removed task won't get an automatic dependeny on the removed tasks dependencies. (A->B->C, and removing B doesn't create A->C). Thus, this should only be used if you know what you're doing.
    2. Setting the task to empty do_task() { : }. This is the old way of disabling a task. The task will still be executed, but there's nothing in it do to. Thus, the execution overhead will remain.
    3. do_task[noexec], the newer way of disabling a task. Pretty similar to 2., but won't keep the execution overhead (as the task will never execute at all).