Linker flags can still be passed via build_flags (docs) so e.g. build_flags = -Wl,-T/path/to/ld_script.ld passes options there.
The other option would be to go with GCC predefined macros for __DATE__ and __TIME__, which are given as strings (Standard Predefined Macros (The C Preprocessor)) .
You could then parse it back to a unix timestamp or just use it directly. Then PIO shouldn’t retrigger the compilation by itself, but you have to take care that this source file is recompied…