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.