[PATCH] D138451: [lld/mac] Add support for distributed thinlto

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 11:25:37 PST 2023


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LGTM. Perhaps another #lld-macho <https://reviews.llvm.org/tag/lld-macho/>	folk wants to take a look as well.



================
Comment at: lld/MachO/Driver.cpp:1873
+
+    // If -thinlto-index-only is given, we should create only "index
+    // files" and not object files. Index file creation is already done
----------------



================
Comment at: lld/MachO/InputFiles.cpp:2253
+std::string macho::replaceThinLTOSuffix(StringRef path) {
+  StringRef suffix = config->thinLTOObjectSuffixReplace.first;
+  StringRef repl = config->thinLTOObjectSuffixReplace.second;
----------------
You can use structured binding declaration now that C++17 can be used.


================
Comment at: lld/test/MachO/thinlto-index-only.ll:2
+; REQUIRES: x86
+; RUN: rm -rf %t; split-file %s %t
+
----------------
thakis wrote:
> MaskRay wrote:
> > if you append `cd %t`, the `%t/` uses below can be removed.
> I'm not a fan of that style: I often copy failing RUN lines from lit output into my terminal, and I don't want to have to `cd` there.
OK, it's fine. I use a custom script to parse `RUN` lines and track CWD, so `cd %t` isn't really a problem for me...
I find %t especially convenient when multiple output files are created. In rare occasions whether an output file exists prior to the test execution matters and ensuring everything is removed makes the test more robust.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138451/new/

https://reviews.llvm.org/D138451



More information about the llvm-commits mailing list