Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42196 )
Change subject: assert.h: Do not use __FILE__ nor __LINE__ on timeless builds ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/42196/1/src/include/assert.h File src/include/assert.h:
https://review.coreboot.org/c/coreboot/+/42196/1/src/include/assert.h@7 PS1, Line 7: #include <build.h> Including <build.h> is always a dependency problem since it is auto-generated. Normally we manually add this dependency to .c files including it, but here you can't do this because this is in itself a header. We could make it a dependency for everything (like <config.h>) but that would be nice to avoid to help with build parallelization.
Since you only want to know *if* we're a timeless build here, not any actual build information from genbuild, I think it would be best to sidestep <build.h>... just put something like this in the Makefile:
ifeq ($(BUILD_TIMELESS),1) CPPFLAGS_common += -D__TIMELESS__ endif
and then to make it pretty in <rules.h>:
#if defined(__TIMELESS__) #define ENV_TIMELESS 1 #else #define ENV_TIMELESS 0 #endif
https://review.coreboot.org/c/coreboot/+/42196/1/src/include/assert.h@22 PS1, Line 22: #define __ASSERT_LINE__ __LINE__ Just to be sure, have you double-checked that this still outputs the correct file and line number in non-timeless builds? Macro replacement order can be tricky and I wouldn't know off-hand how it works out here... wouldn't want every assert to say "file 'src/include/assert.h', line 30".