This is an archive of the discontinued LLVM Phabricator instance.

[Bundler] Use argv[0] as the default choice for the Executable name.
ClosedPublic

Authored by tra on Oct 29 2020, 3:32 PM.

Details

Summary

The path produced by getMainExecutable() may not be the right one when the files are installed in
a symlinked tree and when the real location of llvm-objdump is in a different directory.

Given that clang-offload-bundler is invoked by clang, the driver already does the job figuring out
the right path (e.g. it pays attention to -no-canonical-prefixes).
Offload bundler should use it, instead of trying to figure out the path on its own.

Diff Detail

Event Timeline

tra created this revision.Oct 29 2020, 3:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2020, 3:32 PM
Herald added a subscriber: bixia. · View Herald Transcript
tra requested review of this revision.Oct 29 2020, 3:32 PM
tra retitled this revision from [HIP] Use argv[0] as the default choice for the Executable name. to [Bundler] Use argv[0] as the default choice for the Executable name..Oct 29 2020, 3:35 PM

@tra, thank you for the patch. This makes sense.

The patch looks good but it has to be someone else to okay it.

yaxunl accepted this revision.Nov 3 2020, 5:02 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Nov 3 2020, 5:02 AM
This revision was landed with ongoing or failed builds.Nov 3 2020, 10:32 AM
This revision was automatically updated to reflect the committed changes.