[lld-macho] Add support for -mcpu, -mattr, -code-model in LTO
authorJez Ng <jezng@fb.com>
Tue, 8 Dec 2020 13:08:56 +0000 (05:08 -0800)
committerJez Ng <jezng@fb.com>
Thu, 10 Dec 2020 23:57:51 +0000 (15:57 -0800)
commit29d3b0e47113e011c6fc541fc81c868ef3df21a3
tree518e247835f0f916abeeb4df37a2a024b934aa79
parent863f7a745e6ba5b9aebca82eeba1a2fb1db53e20
[lld-macho] Add support for -mcpu, -mattr, -code-model in LTO

`-mcpu` and `-code-model` tests were copied from similar ones in
LLD-ELF.

There doesn't seem to be an equivalent test for `-mattr` in LLD-ELF, so
I've verified our behavior by cribbing a test from
CodeGen/X86/recip-fastmath.ll.

Reviewed By: #lld-macho, compnerd, MaskRay

Differential Revision: https://reviews.llvm.org/D92912
lld/MachO/Driver.cpp
lld/MachO/LTO.cpp
lld/MachO/Options.td
lld/test/MachO/codemodel.ll [new file with mode: 0644]
lld/test/MachO/cpu-string.ll [new file with mode: 0644]
lld/test/MachO/mattrs.ll [new file with mode: 0644]