This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Avoid explicit -arch in tests by defaulting to x86-64
ClosedPublic

Authored by int3 on Jun 16 2020, 5:55 PM.

Details

Summary

As mentioned in https://reviews.llvm.org/D81326#2093931, I'm not sure it
makes sense to use the default target triple to determine -arch.
Long-term we should probably detect it from the input object files, but
in the meantime it would be nice not to have to add it to all our tests
by using a convenient default.

Diff Detail

Event Timeline

int3 created this revision.Jun 16 2020, 5:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2020, 5:55 PM
smeenai accepted this revision.Jun 17 2020, 2:23 PM
smeenai added a subscriber: smeenai.

This makes sense to me.

Long-term, we want to infer the target architecture from the input object files (as ld64 and the other LLD ports do). Short term, we only support x86-64. Inferring the target architecture from LLVM's default target triple doesn't seem like a necessary intermediate step.

This revision is now accepted and ready to land.Jun 17 2020, 2:23 PM
This revision was automatically updated to reflect the committed changes.