Open jhuber6 opened 1 month ago
@llvm-beanz @petrhosek Any ideas how we could resolve this? It's becoming very time consuming to wait ~30 seconds for CMake to reconfigure even when nothing has changed. Presumably we can't just remove the dependency because someone might actually modify the builtins and force the reconfigure step?
I'm going to guess that this is an interaction between the BUILD_ALWAYS 1
option we pass to ExternalProject_Add
and the dependency on it. Because the runtimes target with always build, we will always be out of date and require a reconfigure. I wonder if there's a way we could work around this.
Using
LLVM_ENABLE_RUNTIMES
creatures nested CMake projects that the main interface will update. Currently, these nested projects will reconfigure every timeninja
is run, even when nothing has changed in the project itself. This wastes a lot of time, especially when maintaining multiple targets at once.After doing some digging, I've found that it's caused by the
builtins
dependency on the runtimes target. Ifcompiler-rt
isn't included or thebuiltins
dependency isn't added, then the problem goes away. It seems that theExternalProject_Add
interface makes CMake think thebuiltins
target is modified after we complete its build step, which triggers the reconfigure on the runtime.