[PATCH] D97799: [lld-macho] Require -arch and -platform_version to always be specified

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 13:09:33 PST 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a subscriber: pengfei.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We previously defaulted to x86_64 and an unknown platform, which was fine when
we only supported one arch and did no platform checks, but that will no longer
be true going ahead. Therefore, we should require those flags to be specified
whenever the linker is invoked.

Note that LLD-ELF and ld64 both infer the arch from their input object files,
but the usefulness of that is questionable since clang will always specify these
flags, and most of the time `lld` will be invoked via clang.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97799

Files:
  lld/MachO/Driver.cpp
  lld/MachO/InputFiles.cpp
  lld/test/MachO/lit.local.cfg
  lld/test/MachO/syslibroot.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97799.327556.patch
Type: text/x-patch
Size: 7228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210302/6bfc17fe/attachment-0001.bin>


More information about the llvm-commits mailing list