If no bitcode files are given as inputs but -object_path_lto is passed
we should avoid running the LTO pipeline.
This mirrors this patch from the ELF port https://github.com/llvm/llvm-project/commit/f3994e4dfa0214b2a09a0e327ba37e6b38bbcdb3
Paths
| Differential D145273
[lld-macho] Avoid running LTO pipeline for no files ClosedPublic Authored by keith on Mar 3 2023, 1:28 PM.
Details
Summary If no bitcode files are given as inputs but -object_path_lto is passed This mirrors this patch from the ELF port https://github.com/llvm/llvm-project/commit/f3994e4dfa0214b2a09a0e327ba37e6b38bbcdb3
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 3 2023, 1:28 PM Comment Actions Thanks!! I think we should follow LLD-ELF whenever reasonable/possible, so I like this better
This revision is now accepted and ready to land.Mar 3 2023, 1:40 PM Closed by commit rGa65678b35bbc: [lld-macho] Avoid running LTO pipeline for no files (authored by keith). · Explain WhyMar 3 2023, 3:49 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 502255 lld/MachO/LTO.h
lld/MachO/LTO.cpp
lld/test/MachO/lto-object-path.ll
|
ultra nit: "NOOBJPATH" refers to the fact that we are not passing -object_path_lto, but "NOLTOPATH" here means we are not passing in any paths to LTO files... the similarity in names seems kind of misleading. Maybe "NOLTOFILES" would be better?