This is an archive of the discontinued LLVM Phabricator instance.

[llvm] [cmake] Skip driver-related code unless LLVM_TOOL_LLVM_DRIVER_BUILD
ClosedPublic

Authored by mgorny on Jul 20 2022, 3:56 AM.

Details

Summary

Disable the code responsible for preparing object libraries
for the driver and filling LLVM_DRIVER_* properties
if LLVM_TOOL_LLVM_DRIVER_BUILD is disabled. These properties are
consumed only by tools/llvm-driver, and so they are not used at all
if LLVM_TOOL_LLVM_DRIVER_BUILD is not enabled. At the same time,
the related code breaks standalone clang builds against LLVM built
with LLVM_LINK_LLVM_DYLIB.

Diff Detail

Event Timeline

mgorny created this revision.Jul 20 2022, 3:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2022, 3:56 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
mgorny requested review of this revision.Jul 20 2022, 3:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2022, 3:56 AM
mgorny added a reviewer: phosek.

@abrachet, I've did a quick test locally using in-tree build with LLVM_TOOL_LLVM_DRIVER_BUILD enabled but could you double-check that everything works on top of this patch, please?

MaskRay accepted this revision.Jul 20 2022, 10:52 AM

I don't understand what happened, but LG

This revision is now accepted and ready to land.Jul 20 2022, 10:52 AM
phosek accepted this revision.Jul 20 2022, 11:11 AM

LGTM

abrachet accepted this revision.Jul 20 2022, 12:33 PM

@abrachet, I've did a quick test locally using in-tree build with LLVM_TOOL_LLVM_DRIVER_BUILD enabled but could you double-check that everything works on top of this patch, please?

Works with both LLVM_TOOL_LLVM_DRIVER_BUILD={On,Off}. Thanks a lot and sorry for the hassle.

This revision was landed with ongoing or failed builds.Jul 20 2022, 1:18 PM
This revision was automatically updated to reflect the committed changes.