Hmm - I was wrong, it seems Rstan preserves the R makevars (I think there was some talk about changing this, but it seems it has not happened... It has been a while since I used Rstan).
Are you concerned that your work might not be reproduced by someone running the default configuration? In your papers/etc, do you document that you changed the optimization level for compilation?
I think it can be a bit of a rabbit hole once you start talking about architectures, compilers, etc., but as I give this more thought I am thinking it might be a bad idea to change the compilation flags from their default from a reproducibility standpoint (unless you are going the full Docker route). As you say, the only way to know the results are the same is to run both and compare them, at which point the quest to save time at run is outweighed by running the same piece of code twice.
I guess that took a philosophical turn, but question answered.
Matt