ZOSOpenTools / meta

Meta repository to tie together the various underlying z/OS Open Source tools repositories here
https://zosopentools.github.io/meta/
Apache License 2.0
37 stars 25 forks source link

Add iden information to executables #750

Closed IgorTodorovskiIBM closed 2 months ago

IgorTodorovskiIBM commented 2 months ago

z/OS provides a tool called iden which can be used to display identity information about an executable. This PR adds such information:

Then you can use iden as follows:

iden /path/to/git
/path/to/git:
     Vendor:zOS_Open_Tools BuildRev:3c2a3fd 2024-04-10 16:50:00 EDT
IgorTodorovskiIBM commented 2 months ago

One minor Q: there was an internal discussion that the string might get optimized out if not used - is that not the case (for all compilers) or does it need an additional #pragma string (or equivalent) - couldn't see a resolution in the discussion...

Otherwise LGTM

For context, in the internal examples, the global variable was defined as a static global. However, since the variable was not used within the source file, the compiler optimized it out.

In this case, I am not using the static qualifier which means the variable will not be optimized out by the compiler because another object could reference it.