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.
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:
And at the end of main/clock.c:
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.