Skip to content

[CMake] Introducing LLVM_DISABLE_PROJECTS to easily exclude projects #141502

Open
@hamidelmaazouz

Description

@hamidelmaazouz

Currently the LLVM_ENABLE_PROJECTS can be used to select which projects to build among the full list of all known projects defined by LLVM_ALL_PROJECTS.

Different LLVM customers require different projects and system-ready binaries are honestly not up to the task as they do not contain everything one needs. I personally find it handy to maintain my own local builds where I prefer to build all and forget once in a while. For this purpose -DLLVM_ENABLE_PROJECTS=all fits nicely. The only problem is that building some projects is problematic and require special intervention which usually derails one from their original goal.

The only currently possible solution to this problem is to explicitly list the projects to enable via the same setting: -DLLVM_ENABLE_PROJECTS=clang;mlir;.... This is fine for people who have specific build requirements and can enlist a few items they need and move on, but it becomes cumbersome for people who just want to build all that's (nominally) possible once and forget.

There needs to be some easy way to exclude and ignore (a few) (potentially problematic or non desirable) projects from the full LLVM_ALL_PROJECTS list without having to explicitly enumerate projects.

This goal of this issue is to propose the introduction of yet another CMake cache variable, say LLVM_DISABLE_PROJECTS whereby users can easily enumerate a few items to ignore instead of explicitly enabling a possibly long list of items.

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