Implement flexible target specification

See commit message.
The compiler-rt library still needs to be specially understood for building staticlib archives, so I don't think that it should be just another post link arg.