This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Fix tablegen exports
ClosedPublic

Authored by nikic on Aug 10 2022, 6:39 AM.

Details

Summary

This fixes some fallout from D131282. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExports. For non-standalone builds, this means that you end up with mlir-tblgen and clang-tblgen in LLVMExports.

However, these projects should instead be using MLIR_EXPORTS/MLIRTargets and CLANG_EXPORTS/ClangTargets. To fix this, add an extra EXPORT option and make use of get_target_export_arg() to create the correct export argument.

Diff Detail

Event Timeline

nikic created this revision.Aug 10 2022, 6:39 AM
nikic requested review of this revision.Aug 10 2022, 6:39 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 10 2022, 6:39 AM
nikic edited the summary of this revision. (Show Details)Aug 10 2022, 7:07 AM
ashay-github accepted this revision.Aug 10 2022, 9:23 AM

LGTM, thanks for the quick fix!

This revision is now accepted and ready to land.Aug 10 2022, 9:23 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2022, 5:17 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript