This is an archive of the discontinued LLVM Phabricator instance.

Add support for setting the path to llvm-symbolizer through an environment variable
ClosedPublic

Authored by mehdi_amini on Sep 23 2020, 6:20 PM.

Details

Summary

This allows to point to an executable that isn't named exactly
"llvm-symbolizer" and not necessarily in the current PATH.

Diff Detail

Event Timeline

mehdi_amini created this revision.Sep 23 2020, 6:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2020, 6:20 PM
mehdi_amini requested review of this revision.Sep 23 2020, 6:20 PM

Tweak variable name

MaskRay added inline comments.Sep 23 2020, 10:39 PM
llvm/lib/Support/Signals.cpp
123–126

if (const char *Path = getenv(LLVMSymbolizerPathEnv))

MaskRay added inline comments.Sep 23 2020, 10:41 PM
llvm/lib/Support/Signals.cpp
124

And perhaps you want to add a pair of braces because ...

You wrote https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements :)

// Use braces for the `if` block to keep it uniform with the else block.

Address comments

MaskRay accepted this revision.Sep 23 2020, 11:35 PM

LGTM.

This revision is now accepted and ready to land.Sep 23 2020, 11:35 PM