As per @timshen request.
I haven't tried this in a while, and a fair amount of things changed, so use with caution, but it's still a good starting point.
Please let me know if you find any problems and I'll try to fix them ASAP.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Also, please note this patch contains also the clang bits. you may want to apply them separately.
Comment Actions
Hi Davide,
Did you ever use -Xclang=-fthin-link-bitcode? In our build we use this flag, and it turns out not to be handled with/without your patch. See https://github.com/llvm-mirror/clang/blob/0cb0ba28983d349395d2d38bdedcd9129ce556c4/lib/CodeGen/BackendUtil.cpp#L752 .
I'm going to use your patch as a start point and add the flag support.
Comment Actions
I think you just need to add the pass to EmitAssemblyWithNewPassManager.
I had that line, but it got lost in the rebase.
Comment Actions
I patched this and re-worked the particular API it uses for exposing the ThinLTO logic into a different surface in https://reviews.llvm.org/D33540 as an alternative approach. Thoughts?