RFE: ident string for UPC++ configure command line

Issue #476 resolved
Paul Hargrove created an issue

GASNet supports encoding useful information in "ident strings" in objects.
These can be viewed using the ident utility that comes with (for instance) RCS, but also via upcxx-run -info [executable].

Dan has observed that while GASNet-EX embeds its own configure command line arguments as an ident string, UPC++ currently does not. Since UPC++'s configure "consumes" some arguments (not passing them to GASNet-EX) we currently lack the means to extract potentially relevant information when assisting an end user.

The issue is a request to create a UPCXXConfigureArgs ident string.

The implementation is probably as simple as configure storing a "safe" (in terms of quoting) version of its arguments in a make variable. The make recipe that currently encodes the git hash into an object file can then be extended to pass this string as well.

Comments (4)

  1. Dan Bonachea

    The implementation is probably as simple as configure storing a "safe" (in terms of quoting) version of its arguments in a make variable. The make recipe that currently encodes the git hash into an object file can then be extended to pass this string as well.

    This approach is potentially complicated by any shell meta-characters appearing quoted in the string.

    It's probably simpler to just output into upcxx_config.hpp something like:

    #define UPCXX_CONFIGURE_STRING "configure line with all double quotes converted to 'single' 'quotes'"
    

    and then use that in watermark.cpp to define the ident, with no changes to the build rules.

  2. Paul Hargrove reporter

    This approach is potentially complicated by any shell meta-characters appearing quoted in the string.

    When I said "safe (in terms of quoting)" I meant this would be addressed (somehow). This was likely to be either escaping double-quotes or, as you mention, replacing them by single quotes.

    Since still need a make rule (and thus at least a shell echo command) to generate upcxx_config.hpp, I don't know that there is any overall improvement in "safety" by following this proposal, but agree this may be a simpler implementation approach by not needing to include double-quotes in the value of a -D... parameter.

    However, having configure generate a second distinct (non-installed?) header file in bld/gen_include/upcxx would take GNU make out of the "chain of custody" for this string.

  3. Log in to comment