This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Require -arch and -platform_version to always be specified
ClosedPublic

Authored by int3 on Mar 2 2021, 1:09 PM.

Details

Summary

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.

Diff Detail

Event Timeline

int3 created this revision.Mar 2 2021, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2021, 1:09 PM
Herald added a subscriber: pengfei. · View Herald Transcript
int3 requested review of this revision.Mar 2 2021, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2021, 1:09 PM
thakis accepted this revision.Mar 2 2021, 4:48 PM
This revision is now accepted and ready to land.Mar 2 2021, 4:48 PM
int3 updated this revision to Diff 327813.Mar 3 2021, 8:39 AM

note in lit.local.config that -syslibroot does not only use last value

This revision was landed with ongoing or failed builds.Mar 3 2021, 12:52 PM
This revision was automatically updated to reflect the committed changes.