-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LinkerWrapper] Do not link device code under a relocatable link (#79314
) Summary: A relocatable link through `clang -r` can go through the clang-linker-wrapper if offloading is enabled. This will have the effect of linking the device code and creating the wrapper module. It will then be merged into the final file. This is useful behavior on its own, but is likely not what is expected for a `-r` job. This patch makes the linker wrapper ignore the device code when doing a reloctable link. This has the effect of the linker merging the `.llvm.offloading` sections in the output object. These will then be parsed as normal when the executable is finally created. Even though this doesn't actually perform a reloctable link on the device code itself, it has a similar effect of combining multiple files into a single one.
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 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