Page MenuHomePhabricator

[CMake] Support passing arguments to build tool for external projects
ClosedPublic

Authored by andrewng on Dec 15 2021, 11:34 AM.

Details

Summary

Add CMake variable LLVM_EXTERNAL_PROJECT_BUILD_TOOL_ARGS to allow
arguments to be passed to the native tool used in CMake --build
invocations for external projects.

Can be used to pass extra arguments for enhanced versions of build
tools, e.g. distributed build options.

Diff Detail

Event Timeline

andrewng created this revision.Dec 15 2021, 11:34 AM
andrewng requested review of this revision.Dec 15 2021, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2021, 11:34 AM
MaskRay edited reviewers, added: beanz; removed: MaskRay.Dec 15 2021, 12:15 PM
MaskRay added a subscriber: MaskRay.

(I don't know much about CMake :/)

beanz added a comment.Jan 5 2022, 9:29 AM

One minor nit, otherwise looks good.

llvm/CMakeLists.txt
179

We should probably mark this as an advanced option since I don't expect most users will use it.

andrewng updated this revision to Diff 397632.Jan 5 2022, 10:23 AM

Address review comments.

phosek accepted this revision.Jan 5 2022, 10:24 AM

LGTM

This revision is now accepted and ready to land.Jan 5 2022, 10:24 AM
beanz accepted this revision.Jan 5 2022, 10:24 AM

LGTM

andrewng marked an inline comment as done.Jan 5 2022, 10:25 AM
andrewng added inline comments.
llvm/CMakeLists.txt
179

Thanks for the suggestion and I've also now learnt about mark_as_advanced.

This revision was landed with ongoing or failed builds.Jan 6 2022, 3:10 AM
This revision was automatically updated to reflect the committed changes.
andrewng marked an inline comment as done.