This patch fixes an issue whereby the LTO linker would not receive any information about target features, so things like architecture extensions would not be accounted for during codegen.
There is perhaps an outstanding question as to why this is required versus obtaining the target features from bitcode. This is the approach I implemented for now, but would be happy to look into whether I can make it work via bitcode if desired.