HomePhabricator

lld: improve the `-arch` handling for MachO

Authored by compnerd on Jun 5 2020, 7:54 PM.

Description

lld: improve the -arch handling for MachO

Use the default target triple configured by the user to determine the
default architecture for ld64.lld. Stash the architecture in the
configuration as when linking against TBDs, we will need to filter out
the symbols based upon the architecture. Treat the Haswell slice as it
is equivalent to x86_64 but with the extra Haswell extensions (e.g.
AVX2, FMA3, BMI1, etc). This will make it easier to add new
architectures in the future.

This change also changes the failure mode where an invalid -arch
parameter will result in the linker exiting without further processing.

Details

Committed
compnerdJun 8 2020, 11:04 AM
Parents
rG22c2dc5931a7: [AArch64] Add a ldst-opt test with undef operands (NFC).
Branches
Unknown
Tags
Unknown