Skip to content

Means for developer review of compiled code #715

Description

@MortenBroerup

Description

Could we introduce some way of allowing source code in Grout, which is only compiled for the benefit of the developer?
Including or omitting it when building could be controlled by a meson option or similar.

Something like (untested):

main/develop.h:

#if DEVELOP_REVIEW_BUILD
  #define DEVELOP_REVIEW_CODE(...) \
  _Pragma("GCC diagnostic push") \
  _Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
  __VA_ARGS__ \
  _Pragma("GCC diagnostic pop")
#else
  #define DEVELOP_REVIEW_CODE(...) /* Nothing */
#endif

And at the end of main/clock.c:

#include "develop.h"
DEVELOP_REVIEW_CODE(
gr_clock_ns_t review_gr_clock_ns(void) {
	return gr_clock_ns();
}
)

Context and Use Cases

During development, especially when working on optimizations, it is sometimes relevant to review the assembler code emitted by the compiler for inline functions or for functions called with certain parameters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds review and proper triage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions