[PATCH] D66485: [Clang][Bundler] Use llvm-objcopy for creating fat object files

Sergey Dmitriev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 26 10:13:35 PDT 2019


sdmitriev marked an inline comment as done.
sdmitriev added inline comments.


================
Comment at: clang/test/Driver/clang-offload-bundler.c:233
+// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -inputs=%t.o,%t.tgt1,%t.tgt2 -outputs=%t.bundle3.o -### 2>&1 \
+// RUN: | FileCheck %s -DHOST=%itanium_abi_triple -DINOBJ1=%t.o -DINOBJ2=%t.tgt1 -DINOBJ3=%t.tgt2 -DOUTOBJ=%t.bundle3.o --check-prefix CK-OBJ-CMD
+// CK-OBJ-CMD: llvm-objcopy{{(.exe)?}}" "--add-section=__CLANG_OFFLOAD_BUNDLE__host-[[HOST]]=[[INOBJ1]]" "--add-section=__CLANG_OFFLOAD_BUNDLE__openmp-powerpc64le-ibm-linux-gnu=[[INOBJ2]]" "--add-section=__CLANG_OFFLOAD_BUNDLE__openmp-x86_64-pc-linux-gnu=[[INOBJ3]]" "[[INOBJ1]]" "[[OUTOBJ]]"
----------------
ABataev wrote:
> Why does FileCheck have all these strange options?
Well, -DVAR=VALUE is a standard FileCheck option which allows to define variable that can be used in the check pattern (please see http://www.llvm.org/docs/CommandGuide/FileCheck.html)

```
-D<VAR=VALUE>
Sets a filecheck pattern variable VAR with value VALUE that can be used in CHECK: lines.
```

I am using these options for defining variables which contain input and output object names as well as the host triple.


Repository:
  rC Clang

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

https://reviews.llvm.org/D66485





More information about the cfe-commits mailing list