Context
I am compiling Chromium using autoninja and the is_component_build build flag which quote "links many parts of the build into separate shared libraries to avoid the long link step at the end.
This is really helpful especially if you consider running incremental builds, which means that only the parts of the codebase that have changed are rebuilt.
The problem
Now, turning our attention to the problem at hand, when using the is_component_build flag, the result is a large number of .ninja artifacts, among with many other files under /gen, that contain hard-coded paths pointing to the build output directory.
Consequently, if one decides to rename the output directory post-build, it disrupts the build integrity if one decides to re-compile incrementally on top of it.
Conclusions
Without much of knowledge, an approach I thought of to redistribute the build (say move it to another location) implies running a "string-find-and-replace" script that needs to have at least knowledge of what the previous build output path was.
Question
Have the ninja build system developers thought of a more formal way of renaming the component build output directories, without having to regenerate the GN meta-build args, to maintain the ability of running incremental builds on a redistributed (moved from path) build output?
If not, what is the correct workflow to re-enable incremental builds on a moved build output directory?