[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2021-02-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I don't think `.bc` files are affected by this patch since they aren't `types::TY_Object` files, but I might misremember. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90457/new/ https://reviews.llvm.org/D90457 __

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2021-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D90457#2551698 , @tbaeder wrote: > Hey @MaskRay, have you thought about this some more? Or is it too much magic > and you'd rather reject it altogether? Yes, it should be rejected. I've seen cases where people want `clang -c a

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2021-02-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Hey @MaskRay, have you thought about this some more? Or is it too much magic and you'd rather reject it altogether? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90457/new/ https://reviews.llvm.org/D90457

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2020-11-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D90457#2390519 , @MaskRay wrote: > Is the motivation just to avoid -flto or -flto=lto at link time? Essentially, yes. Lots of projects seem to depend on this behavior of GCC. I.e. the pass -flto when compiling but not when lin

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2020-11-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Is the motivation just to avoid -flto or -flto=lto at link time? I am afraid that the advantage probably is not large enough to justify the potentially costly object file parsing in the driver. Before this, as I understand it, object files are opaque to the driver. The

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2020-10-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: tstellar, sfantao, tejohnson. Herald added subscribers: cfe-commits, steven_wu, hiraditya, inglorion, mgorny. Herald added a project: clang. tbaeder requested review of this revision. After setting the LTO mode from the -flto option, look at