This moves all the logic of converting LLVM Triples to MachO::CPU_(SUB_)TYPE from the specific target (Target)AsmBackend to more convenient functions in libObject.
This also gets rid of the separate two X86AsmBackend classes.
Paths
| Differential D74808
[MachO][NFC] Extract all CPU_(SUB_)TYPE logic to libObject ClosedPublic Authored by thegameg on Feb 18 2020, 4:59 PM.
Details Summary This moves all the logic of converting LLVM Triples to MachO::CPU_(SUB_)TYPE from the specific target (Target)AsmBackend to more convenient functions in libObject. This also gets rid of the separate two X86AsmBackend classes.
Diff Detail
Event TimelineHerald added subscribers: jsji, dexonsmith, kbarton and 2 others. · View Herald TranscriptFeb 18 2020, 5:00 PM This revision is now accepted and ready to land.Feb 19 2020, 9:40 AM Closed by commit rG726c342ce27a: [macho][NFC] Extract all CPU_(SUB_)TYPE logic to libObject (authored by thegameg). · Explain WhyFeb 20 2020, 10:29 AM This revision was automatically updated to reflect the committed changes. Comment Actions Hi @thegameg, this commit is breaking the shared libs builds. Could you please make sure you code works when configuring with -DBUILD_SHARED_LIBS=On? Thank you! clang: error: linker command failed with exit code 1 (use -v to see invocation) [14/93] Linking CXX shared library lib/libLLVMAnalysis.so.11git ninja: build stopped: subcommand failed. 1874dee5662603c9251228c71b66de72cec0c979 is the first bad commit commit 1874dee5662603c9251228c71b66de72cec0c979 Author: Francis Visoiu Mistrih <francisvm@yahoo.com> Date: Tue Feb 18 16:39:05 2020 -0800 [macho][NFC] Extract all CPU_(SUB_)TYPE logic to BinaryFormat This moves all the logic of converting LLVM Triples to MachO::CPU_(SUB_)TYPE from the specific target (Target)AsmBackend to more convenient functions in lib/BinaryFormat. This also gets rid of the separate two X86AsmBackend classes. The previous attempt was to add it to libObject, but that adds an unnecessary dependency to libObject from all the targets. Differential Revision: https://reviews.llvm.org/D74808 :040000 040000 a02bd9834ed78adda514673d37fede6d5f0308a7 81560f612058cf731629ee17d8e638f99051da21 M llvm bisect run success Comment Actions
Fixed by fad1c750f16c5f7a7ef8ec7d78ae1df4bc473c4a. The dependency has been changed from Object to BinaryFormat by 1874dee5662603c9251228c71b66de72cec0c979 Comment Actions Thanks @fpetrogalli and @MaskRay. I did one more cleanup: a32d539798e4 [Target] Remove libObject dependency in lib/Target.
Revision Contents
Diff 245688 llvm/include/llvm/Object/MachO.h
llvm/lib/Object/MachOObjectFile.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h
llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
|