Skip to content

Commit 2c4fc81

Browse files
jhuber6github-actions[bot]
authored andcommitted
Automerge: [Offload] Let binary utility take empty arguments (#162317)
Summary: There's no real reason to restrict people if they don't want to use `triple`. It's important for the normal pipeline but I can see people using these for other purposes.
2 parents 977be2e + d09d63a commit 2c4fc81

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
; CHECK-NEXT: arch abc
99
; CHECK-NEXT: triple x-y-z
1010
; CHECK-NEXT: producer none
11+
12+
; RUN: llvm-offload-binary -o %t3 --image=file=%s
13+
; RUN: llvm-offload-binary %t3 --image=file=%t4
14+
; RUN: diff %s %t4

llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ static Error bundleImages() {
9292
StringSaver Saver(Alloc);
9393
DenseMap<StringRef, StringRef> Args = getImageArguments(Image, Saver);
9494

95-
if (!Args.count("triple") || !Args.count("file"))
96-
return createStringError(
97-
inconvertibleErrorCode(),
98-
"'file' and 'triple' are required image arguments");
95+
if (!Args.count("file"))
96+
return createStringError(inconvertibleErrorCode(),
97+
"'file' is a required image arguments");
9998

10099
// Permit using multiple instances of `file` in a single string.
101100
for (auto &File : llvm::split(Args["file"], ",")) {

0 commit comments

Comments
 (0)