[PATCH] D13913: Allow linking multiple bitcode files.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 14:24:17 PDT 2015


tra created this revision.
tra added reviewers: echristo, pcc.
tra added a subscriber: cfe-commits.

This will be used for CUDA where we need to link with vendor-supplied bitcode library and with a bitcode library pretending to be  libm for GPUs.

Linking options for particular file depend on the option that specifies the file.
Currently there are two:
  
* -mlink-bitcode-file links in complete content of the specified file.
* -mlink-cuda-bitcode links in only the symbols needed by current TU.
   Linked symbols are internalized. This bitcode linking mode is used to
   link device-specific bitcode provided by CUDA.

Files are linked in order they are specified on command line.

-mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag.


http://reviews.llvm.org/D13913

Files:
  include/clang/Basic/LangOptions.def
  include/clang/CodeGen/CodeGenAction.h
  include/clang/Driver/CC1Options.td
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/CodeGenAction.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/link-bitcode-file.c
  test/CodeGenCUDA/Inputs/device-code-2.ll
  test/CodeGenCUDA/link-device-bitcode.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13913.37917.patch
Type: text/x-patch
Size: 17684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151020/b184a4f6/attachment-0001.bin>


More information about the cfe-commits mailing list