[PATCH] D112189: [macho] add support for emitting macho files with two build version load commands
Alex Lorenz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 15:33:59 PDT 2021
arphaman created this revision.
arphaman added reviewers: ravikandhadai, dexonsmith, steven_wu.
Herald added subscribers: ributzka, hiraditya.
arphaman requested review of this revision.
Herald added a project: LLVM.
This patch extends LLVM IR to add metadata that can be used to emit macho files with two build version load commands. It utilizes "darwin.target_variant.triple" and "darwin.target_variant.SDK Version" metadata names for that, which will be set by a future patch in clang.
MachO uses two build version load commands to represent an object file / binary that is targeting both the macOS target, and the Mac Catalyst target. At runtime, a dynamic library that supports both targets can be loaded from either a native macOS or a Mac Catalyst app on a macOS system. We want to add support to this to upstream to LLVM to be able to build compiler-rt for both targets, to finish the complete support for the Mac Catalyst platform, which is right now targetable by upstream clang, but the compiler-rt bits aren't supported because of the lack of this multiple build version support.
https://reviews.llvm.org/D112189
Files:
llvm/include/llvm/IR/Module.h
llvm/include/llvm/MC/MCAssembler.h
llvm/include/llvm/MC/MCObjectFileInfo.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/IR/Module.cpp
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCMachOStreamer.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/MC/MachObjectWriter.cpp
llvm/test/MC/MachO/darwin-target-variant-reverse.ll
llvm/test/MC/MachO/darwin-target-variant.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112189.381109.patch
Type: text/x-patch
Size: 20524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211020/d76de31e/attachment.bin>
More information about the llvm-commits
mailing list