This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Support separate installation of InstrProfData.inc
ClosedPublic

Authored by phosek on Jul 10 2019, 2:42 PM.

Details

Summary

This header fragment is useful on its own for any consumer that wants
to use custom instruction profile runtime with the LLVM instrumentation.
The concrete use case is in Fuchsia's kernel where we want to use
instruction profile instrumentation, but we cannot use the compiler-rt
runtime because it's not designed for use in the kernel environment.
This change allows installing this header as a separate distribution
component without having to install all LLVM headers.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Jul 10 2019, 2:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2019, 2:42 PM
smeenai added inline comments.Jul 10 2019, 3:28 PM
llvm/include/llvm/ProfileData/CMakeLists.txt
7

You can use add_llvm_install_targets right?

smeenai accepted this revision.Jul 10 2019, 3:29 PM

LGTM with the comment; the use case makes sense to me.

This revision is now accepted and ready to land.Jul 10 2019, 3:29 PM
phosek updated this revision to Diff 230585.Nov 21 2019, 7:58 PM
phosek added a reviewer: vsk.
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2019, 7:58 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

@davidxl @vsk is this OK with you? I'd like to go ahead and land this change.

phosek marked 2 inline comments as done.Nov 21 2019, 8:01 PM
phosek added inline comments.
llvm/include/llvm/ProfileData/CMakeLists.txt
7

I've changed the approach and moved this to compiler-rt which I think is a more appropriate place since this is related to the runtime.

vsk accepted this revision.Nov 22 2019, 10:03 AM

Lgtm. There are a few more profile headers we’d like to expose for internal clients. Thanks for laying the groundwork.

This revision was automatically updated to reflect the committed changes.
phosek marked an inline comment as done.