[PATCH] D116139: [ORC-RT] Add debug logging macros.
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 19:05:54 PST 2021
lhames created this revision.
lhames added reviewers: benlangmuir, steven_wu, dexonsmith.
Herald added a subscriber: mgorny.
lhames requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Inspired by LLVM_DEBUG, but using environment variables rather than command line
options.
Code can use ORC_RT_DEBUG(...) (if ORC_RT_DEBUG_TYPE is set), or
ORC_RT_DEBUG_WITH_TYPE(<type>, ...) (if ORC_RT_DEBUG_TYPE is not set. E.g. in
headers).
Debug logging is enabled in the executor by setting the ORC_RT_DEBUG environment
variable. Debug logging can be restricted by type by setting the
ORC_RT_DEBUG_TYPES environment variable to a comma separated list of types,
e.g. ORC_RT_DEBUG_TYPES=macho_platform,sps.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116139
Files:
compiler-rt/lib/orc/CMakeLists.txt
compiler-rt/lib/orc/debug.cpp
compiler-rt/lib/orc/debug.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116139.395785.patch
Type: text/x-patch
Size: 4062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211222/a92e2b4c/attachment.bin>
More information about the llvm-commits
mailing list