Details
- Reviewers
int3 - Group Reviewers
Restricted Project - Commits
- rG383ed82dd1f8: [clang] Pass more flags to ld64.lld
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
1,130 ms | x64 debian > Clang.Driver::darwin-ld.c |
Event Timeline
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
242 | lgrey: Do you think this should interact with 134275d994d5fb38edfeb587ba45c8f495c8bf66 in any way, or should have any other interesting side effects? From what I understand, it tells the linker to put temporary files created for LTO in the given directory, but then the clang driver cleans up that directory when it exits (potentially after running dsymutil). But most people run dsymutil later, separately, so I think there should be no interactions there. |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
242 | IIUC this is orthogonal to the cache's temp files. Something's actually not adding up here for me (why was it looking at the LTO cache files in the first place?), but this change shouldn't affect the cache thing. |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
272 | Hm, good point. Should we pass --icf=safe for lld if !shouldLinkerNotDedup here then? | |
clang/test/Driver/darwin-ld-dedup.c | ||
4 | "legacy" really has no semantic meaning here other than "I like that other spelling more". It's not like we're ever going to remove -target, it's way too actively used (see e.g. D119446 :P). It seems like a change unrelated to what this patch is doing. If we want to change it, we can do it in a separate patch. |
Pass -B with -fuse-ld=lld since the latter flag only has an effect if ld64.lld exists on disk, and clang/test doesn't depend on lld (and shouldn't).
Also move object_path_lto to its own file since it can run fine on non-darwin hosts.
lgtm!
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
272 | I think our dedup pass is both a lot more effective and a lot more expensive link-time-wise than ld64's so maybe we shouldn't do it by default... |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
272 |
I agree that we should not do icf by default. It can easily take more than 10% time IIRC. |
lgrey: Do you think this should interact with 134275d994d5fb38edfeb587ba45c8f495c8bf66 in any way, or should have any other interesting side effects?
From what I understand, it tells the linker to put temporary files created for LTO in the given directory, but then the clang driver cleans up that directory when it exits (potentially after running dsymutil). But most people run dsymutil later, separately, so I think there should be no interactions there.