The precompile_* are used to create a file that is executed to output the object file.
If you provide a precompile_executation_file that will actually be converted into precompile statements either way. The precompile statements are then wrapped with some Julia code.
(See here. )
The script is just some plain Julia code you can append to the executed Julia code. This way you essentially skip all the smart things PackageCompiler does. (See here.)
I am not sure what the script is for, but from the source code, it seems like one shouldn’t use it if there is no reason for it. Like it could for example add more things to the sysimage than wanted.