[PATCH] D88400: [llvm-objcopy][MachO] Add support for universal binaries

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 00:25:24 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/MachO/universal-object.test:31
+## Case 4: try to copy a universal object file contaning a bitcode slice.
+# RUN: echo 'target triple = "arm64-apple-ios8.0.0"' | llvm-as -o %t.bitcode
+# RUN: llvm-lipo %t.bitcode  %t.x86_64 -create -output %t.universal.containing.bitcode
----------------
Not quite what I had in mind, but I guess this is okay.


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp:424-425
+    // The methods getAsArchive, getAsObjectFile, getAsIRObject of the class
+    // ObjectForArch return an Error in case of the type mismatch which needs to
+    // be consumed.
+    consumeError(ArOrErr.takeError());
----------------
I think my question is "why is it okay to ignore the type mismatch error?"


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88400/new/

https://reviews.llvm.org/D88400



More information about the llvm-commits mailing list