[PATCH] D97426: [lld-macho] Infer machine type from input files

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 10:44:37 PST 2021


thakis added a comment.

In D97426#2595362 <https://reviews.llvm.org/D97426#2595362>, @int3 wrote:

> I realize we should actually validate against the platform as well. ld64 likewise can infer the platform from its inputs. We could make lld require the platform to be explicitly specified, however I think sprinkling `-platform_version` all over our tests is going to be pretty ugly. How do you feel about aliases like `%lld-x86_64` and `%lld-arm64` that expand into include both an arch and a platform flag? I expect that most of our tests will be fine with using e.g. just the macOS platform.

Sounds fine. Maybe just `%lld` can expand to `... -arch x86_64 -platform_version macos ...` and if a test wants something else they can add another flag, which should win over the earlier one?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97426



More information about the llvm-commits mailing list