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.
Loading
Please register or sign in to comment