Skip to content

Commit dedc591

Browse files
authored
[LinkerWrapper] Remove special handling for archives (#114843)
Summary: Previously we extracted archives and did special symbol resolution on them, this was mostly done because the nvlink executable couldn't handle archives natively. Since I have added a wrapper around it that handles that, we can now remove a lot of this complexity and just create a new archive and pass it to the device linker. The one issue here is that for offloading code, we often have references to kernels that do not come from the device link job, but from the host that wishes to call them. Under normal circumstances we would ignore them because they are not referenced, but we need them. For now I am just passing `--whole-archive`. In a future patch I will likely add some logic to create a linker script that will tell the linker which symbols we want to be extracted. That won't work for NVPTX but it's the most canonical solution. Also some ugliness in this patch where I need to juggle whether or not the input is an archive and throw pairs around, I may merge that into the `OffloadFile` struct in a later patch.
1 parent b6df17f commit dedc591

File tree

2 files changed

+23
-384
lines changed

2 files changed

+23
-384
lines changed

clang/test/Driver/linker-wrapper-libs.c

Lines changed: 0 additions & 191 deletions
This file was deleted.

0 commit comments

Comments
 (0)