|
156 | 156 | // RUN: diff %t.i %t.res.i
|
157 | 157 | // RUN: diff %t.tgt1 %t.res.tgt1
|
158 | 158 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 159 | +// RUN: clang-offload-bundler -type=i -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.i -unbundle |
| 160 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
159 | 161 | // RUN: clang-offload-bundler -type=ii -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.ii,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bundle3.ii -unbundle
|
160 | 162 | // RUN: diff %t.ii %t.res.ii
|
161 | 163 | // RUN: diff %t.tgt1 %t.res.tgt1
|
162 | 164 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 165 | +// RUN: clang-offload-bundler -type=ii -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.ii -unbundle |
| 166 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
163 | 167 | // RUN: clang-offload-bundler -type=ll -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.ll,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bundle3.ll -unbundle
|
164 | 168 | // RUN: diff %t.ll %t.res.ll
|
165 | 169 | // RUN: diff %t.tgt1 %t.res.tgt1
|
166 | 170 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 171 | +// RUN: clang-offload-bundler -type=ll -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.ll -unbundle |
| 172 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
167 | 173 | // RUN: clang-offload-bundler -type=s -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.s,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bundle3.s -unbundle
|
168 | 174 | // RUN: diff %t.s %t.res.s
|
169 | 175 | // RUN: diff %t.tgt1 %t.res.tgt1
|
|
172 | 178 | // RUN: diff %t.s %t.res.s
|
173 | 179 | // RUN: diff %t.tgt1 %t.res.tgt1
|
174 | 180 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 181 | +// RUN: clang-offload-bundler -type=s -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.s -unbundle |
| 182 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
175 | 183 |
|
176 | 184 | // Check if we can unbundle a file with no magic strings.
|
177 | 185 | // RUN: clang-offload-bundler -type=s -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.s,%t.res.tgt1,%t.res.tgt2 -inputs=%t.s -unbundle
|
|
183 | 191 | // RUN: diff %t.empty %t.res.tgt1
|
184 | 192 | // RUN: diff %t.empty %t.res.tgt2
|
185 | 193 |
|
| 194 | +// Check that bindler prints an error if given host bundle does not exist in the fat binary. |
| 195 | +// RUN: not clang-offload-bundler -type=s -targets=host-x86_64-xxx-linux-gnu,openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.s,%t.res.tgt1 -inputs=%t.bundle3.s -unbundle 2>&1 | FileCheck %s --check-prefix CK-NO-HOST-BUNDLE |
| 196 | +// CK-NO-HOST-BUNDLE: error: Can't find bundle for the host target |
| 197 | + |
186 | 198 | //
|
187 | 199 | // Check binary bundle/unbundle. The content that we have before bundling must be the same we have after unbundling.
|
188 | 200 | //
|
|
194 | 206 | // RUN: diff %t.bc %t.res.bc
|
195 | 207 | // RUN: diff %t.tgt1 %t.res.tgt1
|
196 | 208 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 209 | +// RUN: clang-offload-bundler -type=bc -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.bc -unbundle |
| 210 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
197 | 211 | // RUN: clang-offload-bundler -type=gch -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.gch,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bundle3.gch -unbundle
|
198 | 212 | // RUN: diff %t.ast %t.res.gch
|
199 | 213 | // RUN: diff %t.tgt1 %t.res.tgt1
|
200 | 214 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 215 | +// RUN: clang-offload-bundler -type=gch -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.gch -unbundle |
| 216 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
201 | 217 | // RUN: clang-offload-bundler -type=ast -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.ast,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bundle3.ast -unbundle
|
202 | 218 | // RUN: diff %t.ast %t.res.ast
|
203 | 219 | // RUN: diff %t.tgt1 %t.res.tgt1
|
|
210 | 226 | // RUN: diff %t.ast %t.res.ast
|
211 | 227 | // RUN: diff %t.tgt1 %t.res.tgt1
|
212 | 228 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 229 | +// RUN: clang-offload-bundler -type=ast -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.ast -unbundle |
| 230 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
213 | 231 |
|
214 | 232 | // Check if we can unbundle a file with no magic strings.
|
215 | 233 | // RUN: clang-offload-bundler -type=bc -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.bc,%t.res.tgt1,%t.res.tgt2 -inputs=%t.bc -unbundle
|
|
247 | 265 | // RUN: diff %t.o %t.res.o
|
248 | 266 | // RUN: diff %t.tgt1 %t.res.tgt1
|
249 | 267 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 268 | +// RUN: clang-offload-bundler -type=o -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.o -unbundle |
| 269 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
250 | 270 |
|
251 | 271 | // Check if we can unbundle a file with no magic strings.
|
252 | 272 | // RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.o,%t.res.tgt1,%t.res.tgt2 -inputs=%t.o -unbundle
|
|
0 commit comments