Yes.
And this behavior could even be implemented in Lazarus without touching FPC at all: There would only be one "build" button instead of two and Lazarus or lazbuild remembers the last used options and if they changed it would compile with -B ("build") and if not it would do what "compile" is currently doing: decide only by timestamp.
Defines and directories can be in so many places, and building is fragmented, so I think this is unpractical
The biggest one of which is that lazbuild can't recompile libraries that come with FPC automatically. It only works for the lazarus part.
(though in theory that could be worked around with -Ur).
I don't understand why this is less practical than the current solution with two different build buttons? What I proposed was just a simple logic that automatically decides which of the two buttons to "press".
* Options didn't change, so "compile" is sufficient (let FPC just look at timestamps of each unit)
* Options changed, so "build" is needed
Nothing else. Especially I was not talking about rebuilding FCL packges, they have their own optios anyways and don't need rebuilding when the compile options in your app have changed.
---
Implementing it in FPC would only bring an advantage if it would indeed keep track of whether a particular define is used in the unit or not, for every single unit in the dependency tree. Otherwise it would be the same result for every unit, so you don't have to store it at the unit level in the first place, you could make this decision once at the top level file, like it is done now (manually by deciding which of the two buttons to click) and which is exactly what I proposed: A way to automate this human decision.