This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Clean up XRay build configuration
ClosedPublic

Authored by dberris on Sep 21 2018, 3:34 AM.

Details

Summary

This change spans both LLVM and compiler-rt, where we do the following:

  • Add XRay to the LLVMBuild system, to allow for distributing the XRay trace loading library along with the LLVM distributions.
  • Use llvm-config better in the compiler-rt XRay implementation, to depend on the potentially already-distributed LLVM XRay library.

While this is tested with the standalone compiler-rt build, it does
require that the LLVMXRay library (and LLVMSupport as well) are
available during the build. In case the static libraries are available,
the unit tests will build and work fine. We're still having issues with
attempting to use a shared library version of the LLVMXRay library since
the shared library might not be accessible from the standard shared
library lookup paths.

The larger change here is the inclusion of the LLVMXRay library in the
distribution, which allows for building tools around the XRay traces and
profiles that the XRay runtime already generates.

Diff Detail

Repository
rL LLVM

Event Timeline

dberris created this revision.Sep 21 2018, 3:34 AM
dberris updated this revision to Diff 166437.Sep 21 2018, 3:37 AM
dberris edited the summary of this revision. (Show Details)

Fixup description.

dberris updated this revision to Diff 166438.Sep 21 2018, 3:40 AM

Update LLVMBuild.txt header in llvm/lib/XRay/.

This revision is now accepted and ready to land.Sep 21 2018, 4:05 AM
This revision was automatically updated to reflect the committed changes.
mgorny added inline comments.Dec 18 2018, 11:59 AM
compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
242

I'm sorry but this can't really work properly with stand-alone builds since LLVMTestingSupport is not installed. You need to build it from the source tree, and that's true PITA. I've just spent two hours trying to fix this and I've reached peak level of frustration where I give up.