[all-commits] [llvm/llvm-project] 55f384: [Clang] Always use --no-undefined when linking AMD...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Mar 14 11:11:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 55f38495e38e2a3aeb4f2dac852644eb4937bd74
https://github.com/llvm/llvm-project/commit/55f38495e38e2a3aeb4f2dac852644eb4937bd74
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Driver/ToolChains/AMDGPU.cpp
M clang/test/Driver/amdgpu-toolchain-opencl.cl
M clang/test/Driver/amdgpu-toolchain.c
Log Message:
-----------
[Clang] Always use --no-undefined when linking AMDGPU images
AMDGPU uses ELF shared libraries to implement their executable device
images. One downside to this method is that it disables regular warnings
on undefined symbols. This is because shared libraries expect these to
be resolves by later loads. However, the GPU images do not support
dynamic linking so any undefined symbol is going to cause a runtime
error. This patch adds `--no-undefined` to the `ld.lld` invocation to guarantee
that undefined symbols are always caught as linking errors rather than
runtime errors.
Reviewed By: arsenm, MaskRay, #amdgpu
Differential Revision: https://reviews.llvm.org/D145941
More information about the All-commits
mailing list