Skip to content

Support standalone builds of LLVM Projects #21877

@kilyanni

Description

@kilyanni

Is your feature request related to a problem? Please describe

Currently, only monolithic LLVM builds are supported, i.e. a single CMake
configuration rooted at llvm/, with LLVM's CMake machinery pulling in
subprojects. For downstream packaging it would be convenient to build and
package subprojects individually.

For the purposes of this issue, a "standalone build" means being able to configure a subproject against an already-built (Intel-)LLVM/Clang/etc. (via -DLLVM_DIR=..., find_package(LLVM), etc.). That is, neither build/ nor any (non-explicitly-exported) CMake variables are shared with the standalone build.

Projects that do not currently support standalone (out-of-tree) builds:

  • libclc
  • opencl
  • libdevice
  • sycl
  • sycl-jit
  • unified-runtime

Describe the solution you would like

Support standalone builds for all of the projects listed above. This issue
is intended to serve as a tracking issue; the checklist above will be
ticked off as each project gains standalone build support.

Describe alternatives you have considered

Continue using monolithic builds.

Additional context

This was briefly discussed in #19635 (comment) (cc @sarnex):

At this point I don't think we have bandwidth to support currently unsupported compilation modes, but patches are welcome!

I don't expect upstream to implement this themselves, the intent is to use
this issue as a tracking target that individual PRs can link back to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions