What kind of compiler and linker commands to build modes generate?
None, build modes are IDE concept. The compiler knows nothing about it.
Is it possible to use build modes in source code only, thus making them easier to compare?
I don't quite understand what you mean.
In fact I would like to know how IDE settings in general get translated to compiling and linking commands.
Each settings represent a compiler option, the IDE simply concat and pass them to the compiler. We normally don't need to call the linker manually, the compiler will do that automatically, both for internal and external linker. There are compiler options for controlling what to pass to the linker, though.
Does it all go into ppas.bat?
AFAIK this file is only generated when "omit linking stage" (or the less "Do not call assembler and linker) option is given, to allow manual modification before building the executable.