Hahnfeld added a comment.

Another overall question: Back in February you said that it would be possible 
to have a "default" object that can be taken without knowledge of the bundler 
(see http://lists.llvm.org/pipermail/cfe-dev/2016-February/047555.html).

In my tests with the patch, this has not worked yet - am I missing something or 
is this not yet implemented?


================
Comment at: tools/clang-offload-bundler/ClangOffloadBundler.cpp:477-490
@@ +476,16 @@
+
+    // Do the incremental linking. We write to the output file directly. So, we
+    // close it and use the name to pass down to clang.
+    OS.close();
+    SmallString<128> TargetName = getTriple(TargetNames.front());
+    const char *ClangArgs[] = {"clang",
+                               "-r",
+                               "-target",
+                               TargetName.c_str(),
+                               "-o",
+                               OutputFileNames.front().c_str(),
+                               InputFileNames.front().c_str(),
+                               BitcodeFileName.c_str(),
+                               "-nostdlib",
+                               nullptr};
+
----------------
sfantao wrote:
> Hahnfeld wrote:
> > `test/Driver/clang-offload-bundler.c` gives me
> > ```
> > /..//bin/ld: unrecognised emulation mode: elf64lppc
> > Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om 
> > elf_k1om
> > ```
> > and therefore fails.
> > 
> > I'm on an x86_64 Linux and obviously my `GNU ld version 2.23.52.0.1-55.el7 
> > 20130226` doesn't support Power :-(
> Oh, right... I cannot run the bundler in the regression tests to tests the 
> bundler. I guess I need some sort of dry run option to check the commands are 
> correct without actually running them.
> 
> I'll fix that.
Yes, comparable to `-###` in `clang`?

Another option (that I don't really prefer, just for completeness) would be to 
have separate tests that have appropriate `REQUIRES`...


http://reviews.llvm.org/D21851



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to