Skip to content

[Runtimes] Builtins target forces runtime targets to reconfigure every build #98897

@jhuber6

Description

@jhuber6

Using LLVM_ENABLE_RUNTIMES creates nested CMake projects that the main interface will update. Currently, these nested projects will reconfigure every time ninja 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. If compiler-rt isn't included or the builtins dependency isn't added, then the problem goes away. It seems that the ExternalProject_Add interface makes CMake think the builtins target is modified after we complete its build step, which triggers the reconfigure on the runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cmakeBuild system in general and CMake in particular

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions