Had a look at it and tried the substitution/back-substitution idea. Unluckily, it is not quite so easy with the current build system, as the same parameter is passed through macro replacement 2-4 times (depending on what it is). This is due to historical reasons: back in the old days, compiler variables were registered as enviromnent variables in a first pass and looked up later in a separate pass.
Consequently, the substitution/back-substitution approach fails in the second pass.
It would require a bit of a bigger hack to make it work (unless one is willing to rewrite the existing build system just for this, which does not make sense). One could do the final back-substitution in the compiler plugin, just before the commandline is passed to the sub-process. This would do the job, but it would be quite bad style (that operation does not belong into this module).
The other option would be to rewrite the build chain so macro replacement runs over the commandline exactly once, which would be the correct thing to do anyway. However, the risk of breaking something major for a relatively minor feature is quite big (we've had that before), so I am afraid that'll have to be postponed for a later occasion.