[PATCH] D45474: [XRay][clang+compiler-rt] Support build-time mode selection

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 23:24:38 PDT 2018


dberris created this revision.
dberris added reviewers: echristo, eizan, chandlerc.
Herald added subscribers: mgrang, mgorny.

This patch implements the `-fxray-modes=` flag which allows users
building with XRay instrumentation to decide which modes to pre-package
into the binary being linked. The default is the status quo, which will
link all the available modes.

For this to work we're also breaking apart the mode implementations
(xray-fdr and xray-basic) from the main xray runtime. This gives more
granular control of which modes are pre-packaged, and picked from
clang's invocation.

This fixes llvm.org/PR37066.

Note that in the future, we may change the default for clang to only
contain the profiling implementation under development in https://reviews.llvm.org/D44620, when
that implementation is ready.


https://reviews.llvm.org/D45474

Files:
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/XRayArgs.h
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/lib/Driver/XRayArgs.cpp
  clang/test/Driver/XRay/xray-mode-flags.cpp
  compiler-rt/lib/xray/CMakeLists.txt
  compiler-rt/lib/xray/tests/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45474.141794.patch
Type: text/x-patch
Size: 12366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180410/b1215f79/attachment.bin>


More information about the llvm-commits mailing list