|
170 | 170 | // RUN: diff %t.i %t.res.i
|
171 | 171 | // RUN: diff %t.tgt1 %t.res.tgt1
|
172 | 172 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 173 | +// RUN: clang-offload-bundler -type=i -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.i -unbundle |
| 174 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
173 | 175 | // RUN: clang-offload-bundler -type=ii -targets=host-powerpc64le-ibm-linux-gnu,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
|
174 | 176 | // RUN: diff %t.ii %t.res.ii
|
175 | 177 | // RUN: diff %t.tgt1 %t.res.tgt1
|
176 | 178 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 179 | +// RUN: clang-offload-bundler -type=ii -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.ii -unbundle |
| 180 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
177 | 181 | // RUN: clang-offload-bundler -type=ll -targets=host-powerpc64le-ibm-linux-gnu,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
|
178 | 182 | // RUN: diff %t.ll %t.res.ll
|
179 | 183 | // RUN: diff %t.tgt1 %t.res.tgt1
|
180 | 184 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 185 | +// RUN: clang-offload-bundler -type=ll -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.ll -unbundle |
| 186 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
181 | 187 | // RUN: clang-offload-bundler -type=s -targets=host-powerpc64le-ibm-linux-gnu,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
|
182 | 188 | // RUN: diff %t.s %t.res.s
|
183 | 189 | // RUN: diff %t.tgt1 %t.res.tgt1
|
|
186 | 192 | // RUN: diff %t.s %t.res.s
|
187 | 193 | // RUN: diff %t.tgt1 %t.res.tgt1
|
188 | 194 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 195 | +// RUN: clang-offload-bundler -type=s -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.s -unbundle |
| 196 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
189 | 197 |
|
190 | 198 | // Check if we can unbundle a file with no magic strings.
|
191 | 199 | // RUN: clang-offload-bundler -type=s -targets=host-powerpc64le-ibm-linux-gnu,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
|
|
197 | 205 | // RUN: diff %t.empty %t.res.tgt1
|
198 | 206 | // RUN: diff %t.empty %t.res.tgt2
|
199 | 207 |
|
| 208 | +// Check that bindler prints an error if given host bundle does not exist in the fat binary. |
| 209 | +// 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 |
| 210 | +// CK-NO-HOST-BUNDLE: error: Can't find bundle for the host target |
| 211 | + |
200 | 212 | //
|
201 | 213 | // Check binary bundle/unbundle. The content that we have before bundling must be the same we have after unbundling.
|
202 | 214 | //
|
|
208 | 220 | // RUN: diff %t.bc %t.res.bc
|
209 | 221 | // RUN: diff %t.tgt1 %t.res.tgt1
|
210 | 222 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 223 | +// RUN: clang-offload-bundler -type=bc -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.bc -unbundle |
| 224 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
211 | 225 | // RUN: clang-offload-bundler -type=gch -targets=host-powerpc64le-ibm-linux-gnu,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
|
212 | 226 | // RUN: diff %t.ast %t.res.gch
|
213 | 227 | // RUN: diff %t.tgt1 %t.res.tgt1
|
214 | 228 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 229 | +// RUN: clang-offload-bundler -type=gch -targets=openmp-x86_64-pc-linux-gnu -outputs=%t.res.tgt2 -inputs=%t.bundle3.gch -unbundle |
| 230 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
215 | 231 | // RUN: clang-offload-bundler -type=ast -targets=host-powerpc64le-ibm-linux-gnu,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
|
216 | 232 | // RUN: diff %t.ast %t.res.ast
|
217 | 233 | // RUN: diff %t.tgt1 %t.res.tgt1
|
|
224 | 240 | // RUN: diff %t.ast %t.res.ast
|
225 | 241 | // RUN: diff %t.tgt1 %t.res.tgt1
|
226 | 242 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 243 | +// RUN: clang-offload-bundler -type=ast -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.bundle3.ast -unbundle |
| 244 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
227 | 245 |
|
228 | 246 | // Check if we can unbundle a file with no magic strings.
|
229 | 247 | // RUN: clang-offload-bundler -type=bc -targets=host-powerpc64le-ibm-linux-gnu,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
|
|
235 | 253 | // RUN: diff %t.empty %t.res.tgt1
|
236 | 254 | // RUN: diff %t.empty %t.res.tgt2
|
237 | 255 |
|
| 256 | +// Check that we do not have to unbundle all available bundles from the fat binary. |
| 257 | +// RUN: clang-offload-bundler -type=ast -targets=host-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.res.ast,%t.res.tgt2 -inputs=%t.bundle3.unordered.ast -unbundle |
| 258 | +// RUN: diff %t.ast %t.res.ast |
| 259 | +// RUN: diff %t.tgt2 %t.res.tgt2 |
| 260 | + |
238 | 261 | //
|
239 | 262 | // Check object bundle/unbundle. The content should be bundled into an ELF
|
240 | 263 | // section (we are using a PowerPC little-endian host which uses ELF). We
|
|
255 | 278 | // RUN: diff %t.2.o %t.res.o
|
256 | 279 | // RUN: diff %t.tgt1 %t.res.tgt1
|
257 | 280 | // RUN: diff %t.tgt2 %t.res.tgt2
|
| 281 | +// RUN: clang-offload-bundler -type=o -targets=openmp-powerpc64le-ibm-linux-gnu -outputs=%t.res.tgt1 -inputs=%t.2.o -unbundle |
| 282 | +// RUN: diff %t.tgt1 %t.res.tgt1 |
258 | 283 |
|
259 | 284 | // Check if we can unbundle a file with no magic strings.
|
260 | 285 | // RUN: clang-offload-bundler -type=o -targets=host-powerpc64le-ibm-linux-gnu,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