Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][OpenMP] Add partial support for Static Device Libraries
An archive containing device code object files can be passed to clang command line for linking. For each given offload target it creates a device specific archives which is either passed to llvm-link if the target is amdgpu, or to clang-nvlink-wrapper if the target is nvptx. -L/-l flags are used to specify these fat archives on the command line. E.g. clang++ -fopenmp -fopenmp-targets=nvptx64 main.cpp -L. -lmylib It currently doesn't support linking an archive directly, like: clang++ -fopenmp -fopenmp-targets=nvptx64 main.cpp libmylib.a Linking with x86 offload also does not work. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D105191
- Loading branch information
Showing
9 changed files
with
551 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.