From dedad08ee8e69129a1f6ac104e34960b50c94d94 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 18 Dec 2019 10:19:47 -0800 Subject: [llvm-symbolizer] Support reading options from environment llvm-symbolizer is used by sanitizers to symbolize errors discovered by sanitizer, but there's no way to pass options to llvm-symbolizer since the tool is invoked directly by the sanitizer runtime. Therefore, we don't have a way to pass options needed to find debug symbols such as -dsym-hint or -debug-file-directory. This change enables reading options from the LLVM_SYMBOLIZER_OPTS in addition to command line which can be used to pass those additional options to llvm-symbolizer invocations made by sanitizer runtime. Differential Revision: https://reviews.llvm.org/D71668 --- llvm/docs/CommandGuide/llvm-symbolizer.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/docs/CommandGuide/llvm-symbolizer.rst') diff --git a/llvm/docs/CommandGuide/llvm-symbolizer.rst b/llvm/docs/CommandGuide/llvm-symbolizer.rst index b157f94ef22..bb60246c835 100644 --- a/llvm/docs/CommandGuide/llvm-symbolizer.rst +++ b/llvm/docs/CommandGuide/llvm-symbolizer.rst @@ -28,6 +28,12 @@ Object files can be specified together with the addresses either on standard input or as positional arguments on the command-line, following any "DATA" or "CODE" prefix. +:program:`llvm-symbolizer` parses options from the environment variable +``LLVM_SYMBOLIZER_OPTS`` after parsing options from the command line. +``LLVM_SYMBOLIZER_OPTS`` is primarily useful for supplementing the command-line +options when :program:`llvm-symbolizer` is invoked by another program or +runtime. + EXAMPLES -------- -- cgit v1.2.3