Page MenuHomePhabricator

Only use argv[0] as the main executable name if it exists.
ClosedPublic

Authored by silvas on Apr 15 2019, 1:25 PM.

Details

Summary
Under some environments, argv[0] doesn't hold a valid file name, but
sys::fs::getMainExecutable will find the main executable properly.

This patch tweaks the logic to fall back to sys::fs::getMainExecutable
in more situations.

Diff Detail

Repository
rL LLVM

Event Timeline

silvas created this revision.Apr 15 2019, 1:25 PM
Herald added a project: Restricted Project. · View Herald Transcript
rsmith accepted this revision.Apr 15 2019, 1:56 PM

LGTM

This revision is now accepted and ready to land.Apr 15 2019, 1:56 PM
jpienaar accepted this revision.Apr 15 2019, 2:04 PM
This revision was automatically updated to reflect the committed changes.