mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
Support SOURCE_DATE_EPOCH for reproducible builds
See https://reproducible-builds.org/docs/source-date-epoch/ Fixes #286
This commit is contained in:
@@ -655,7 +655,7 @@ static inline struct Symbol *createBuiltinSymbol(char const *name)
|
||||
/*
|
||||
* Initialize the symboltable
|
||||
*/
|
||||
void sym_Init(void)
|
||||
void sym_Init(time_t now)
|
||||
{
|
||||
PCSymbol = createBuiltinSymbol("@");
|
||||
struct Symbol *_NARGSymbol = createBuiltinSymbol("_NARG");
|
||||
@@ -677,8 +677,6 @@ void sym_Init(void)
|
||||
sym_AddEqu("__RGBDS_MINOR__", PACKAGE_VERSION_MINOR)->isBuiltin = true;
|
||||
sym_AddEqu("__RGBDS_PATCH__", PACKAGE_VERSION_PATCH)->isBuiltin = true;
|
||||
|
||||
time_t now = time(NULL);
|
||||
|
||||
if (now == (time_t)-1) {
|
||||
warn("Couldn't determine current time");
|
||||
/* Fall back by pretending we are at the Epoch */
|
||||
|
||||
Reference in New Issue
Block a user