--- /dev/null
+target triple = "arm64-apple-macosx11.0.0"
+
+module asm ".desc ___crashreporter_info__, 0x10"
+
+define void @somesymbol() {
+ ret void
+}
--- /dev/null
+target triple = "x86_64-apple-macosx11.0.0"
+
+module asm ".desc ___crashreporter_info__, 0x10"
+
+define void @somesymbol() {
+ ret void
+}
--- /dev/null
+# RUN: llvm-as %p/Inputs/arm64-asm.ll -o %t-arm64-asm.o
+# RUN: llvm-as %p/Inputs/x86_64-asm.ll -o %t-x86_64-asm.o
+
+# RUN: llvm-lipo %t-arm64-asm.o %t-x86_64-asm.o -create -output %t-universal.o
+# RUN: llvm-lipo %t-arm64-asm.o -arch x86_64 %t-x86_64-asm.o -create -output %t-universal-1.o
+# RUN: cmp %t-universal.o %t-universal-1.o
+# RUN: llvm-lipo -arch arm64 %t-arm64-asm.o -arch x86_64 %t-x86_64-asm.o -create -output %t-universal-2.o
+# RUN: cmp %t-universal.o %t-universal-2.o
#include "llvm/Support/Error.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/InitLLVM.h"
+#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/WithColor.h"
#include "llvm/TextAPI/Architecture.h"
Expected<Slice> SliceOrErr = createSliceFromIR(*IR, 0);
if (!SliceOrErr)
reportError(IR->getFileName(), SliceOrErr.takeError());
-
+
OS << SliceOrErr->getArchString() << " \n";
}
int main(int argc, char **argv) {
InitLLVM X(argc, argv);
+ llvm::InitializeAllTargetInfos();
+ llvm::InitializeAllTargetMCs();
+ llvm::InitializeAllAsmParsers();
+
Config C = parseLipoOptions(makeArrayRef(argv + 1, argc - 1));
LLVMContext LLVMCtx;
SmallVector<OwningBinary<Binary>, 1> InputBinaries =