[PATCH] D118862: [clang][driver] add clang driver support for emitting macho files with two build version load commands

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 2 16:38:59 PST 2022


arphaman created this revision.
arphaman added reviewers: ravikandhadai, egorzhdan, dexonsmith, steven_wu.
Herald added subscribers: dang, ributzka.
arphaman requested review of this revision.
Herald added a project: clang.

This patch extends clang driver to pass the right flags to the clang frontend, and ld64, so that they can emit macho files with two build version load commands.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118862

Files:
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/lib/Driver/ToolChains/Darwin.h
  clang/test/Driver/darwin-ld-platform-version-target-version.c
  clang/test/Driver/darwin-objc-runtime-maccatalyst-target-variant.m
  clang/test/Driver/darwin-target-variant-sdk-version.c
  clang/test/Driver/darwin-target-variant.c
  clang/test/Driver/darwin-zippered-target-version.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118862.405495.patch
Type: text/x-patch
Size: 23697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220203/dc71e07f/attachment-0001.bin>


More information about the cfe-commits mailing list