Refine in-tree compiler args for --test-compiler=stage1
Some of the logic to calculate in-tree arguments was not correct for the stage1 compiler. Namely we were not correctly reporting whether we were building static or dynamic executables and whether debug assertions were enabled.
Fixes #22096 (closed)