[all-commits] [llvm/llvm-project] 4c4117: [Clang][OpenMP] Add partial support for Static Dev...
Saiyedul Islam via All-commits
all-commits at lists.llvm.org
Wed Oct 6 21:46:24 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4c4117089599cb5b6c6fa5635c28462ffd1bddf4
https://github.com/llvm/llvm-project/commit/4c4117089599cb5b6c6fa5635c28462ffd1bddf4
Author: Saiyedul Islam <Saiyedul.Islam at amd.com>
Date: 2021-10-07 (Thu, 07 Oct 2021)
Changed paths:
M clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/lib/Driver/ToolChains/CommonArgs.h
M clang/lib/Driver/ToolChains/Cuda.cpp
A clang/test/Driver/Inputs/openmp_static_device_link/libFatArchive.a
A clang/test/Driver/fat_archive_amdgpu.cpp
A clang/test/Driver/fat_archive_nvptx.cpp
M clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list