This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][ZOS] Implement getMainExecutable() and is_local_impl()
ClosedPublic

Authored by Kai on Jun 25 2020, 5:56 AM.

Details

Summary

Adds implementation of getMainExecutable() and is_local_impl() to Support/Unix/Path.inc.
Both are needed to compile LLVM for z/OS.

Diff Detail

Event Timeline

Kai created this revision.Jun 25 2020, 5:56 AM

some nitpick comments. I'm not familiar with z/OS's APIs here so not qualified to fully review the change in getMainExecutable but seems reasonable

llvm/lib/Support/Unix/Path.inc
55

this should probably be part of the #ifdef/#elif block?

70

Maybe this?

#if !defined(PATH_MAX)
# if defined(__GNU__)
#  define PATH_MAX 4096
# elif defined(__MVS__)
#  define PATH_MAX _XOPEN_PATH_MAX
# endif
#endif
Kai updated this revision to Diff 273341.Jun 25 2020, 7:09 AM
  • Moved the first #if defined(__MVS__) into the if/elif casecade right above
  • Rearranged the #if !defined(PATH_MAX) guarded section
hubert.reinterpretcast added inline comments.
llvm/lib/Support/Unix/Path.inc
63–64

Minor nit: The comment placement is awkward here. It would work just find inside the __GNU__ block.

Kai updated this revision to Diff 274075.Jun 29 2020, 5:41 AM
  • Moved comment inside #if defined(__GNU__)
Kai marked 2 inline comments as done.Jun 29 2020, 5:41 AM
This revision is now accepted and ready to land.Jun 29 2020, 6:07 AM
This revision was automatically updated to reflect the committed changes.