Fold 'assert', 'optlvl' and 'dbgsym' into a unified 'codemode'

Issue #467 new
Paul Hargrove created an issue

This issue is a proposal for "dead generality removal". However it is "Kind = proposal" until we establish that the generality in question really has no uses.

Currently our makefiles support 'assert', 'optlvl' and 'dbgsym' as three distinct variables. With 4 possible values of optlvl and the other two being boolean, this means 16 possible variants on each library build (where "each" is a {network}x{seq,par} pair). To the best of my knowledge we've never utilized this generality beyond the two combinations which correspond to our two "codemode" settings: "opt" (0,3,0) and "debug" (1,0,1).

Unless there is a reasonable counter-argument, I propose to fold these three variables into 'codemode'. Doing so should significantly reduce the complexity of certain aspects of the current Makefiles, most notably those which involve iteration over the 16 points in the configuration space or otherwise allow for the possibility that assertions, optimization and debugging symbols might be manipulated independently in ways not possible via other mechanisms such as MANUAL_CXXFLAGS .

Comments (1)

  1. Dan Bonachea

    While I have not needed it recently, I think there IS occasional motivation for building libupcxx.a with all of optimization, debug symbols and UPCXX-level assertions (1,3,1), as a means to help library maintainers track down opt-specific defects. IIUC the proposed "folding" would remove the ability to easily do that, which today is as easy as make run SRC=whatever.cpp DBGSYM=1 ASSERT=1 OPTLEV=3

    I'd want to be convinced it was still possible to get similar effect via other means. MANUAL_CXXFLAGS is notably somewhat hacky because it has no persistent effect, so subsequent build commands with different MANUAL_CXXFLAGS values could result in a patchwork of object files built with different flags.

  2. Log in to comment