[PATCH] D29066: Forward -bitcode_process_mode to ld64 in marker-only mode

Mehdi AMINI via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 18:42:00 PST 2017


mehdi_amini created this revision.

https://reviews.llvm.org/D29066

Files:
  clang/lib/Driver/Tools.cpp


Index: clang/lib/Driver/Tools.cpp
===================================================================
--- clang/lib/Driver/Tools.cpp
+++ clang/lib/Driver/Tools.cpp
@@ -8435,9 +8435,13 @@
   // for embed-bitcode, use -bitcode_bundle in linker command
   if (C.getDriver().embedBitcodeEnabled()) {
     // Check if the toolchain supports bitcode build flow.
-    if (MachOTC.SupportsEmbeddedBitcode())
+    if (MachOTC.SupportsEmbeddedBitcode()) {
       CmdArgs.push_back("-bitcode_bundle");
-    else
+      if (C.getDriver().embedBitcodeMarkerOnly() && Version[0] >= 278) {
+        CmdArgs.push_back("-bitcode_process_mode");
+        CmdArgs.push_back("marker");
+      }
+    } else
       D.Diag(diag::err_drv_bitcode_unsupported_on_toolchain);
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29066.85512.patch
Type: text/x-patch
Size: 757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170124/8bea3605/attachment.bin>


More information about the cfe-commits mailing list