-O1 and above don't call real optimizer pipeline in ThinLTO PreLink.
Also clang can't add PostLink OptimizerLastEPCallbacks for in-process ThinLTO.
This results in the missing sanitizer instrumentation with ThinLTO.
This is the simplest working solution which just calls
OptimizerLastEPCallbacks at the end of buildThinLTOPreLinkDefaultPipeline.
what about just IsThinLTOPostLink? The Skip implies that we should skip ThinLTO post link, not that we should skip the passes.