Repository navigation
Commit c0260ec
authored
Document the loader tag the runtime asks for on Linux (pytorch#21990)
Linking the runtime asks the linker for `DT_RUNPATH` rather than the
older `DT_RPATH`.
That choice is deliberate, because `DT_RPATH` outranks `LD_LIBRARY_PATH`
and applies to
a dependency's own dependencies, so it would take away a user's ability
to point an
instrumented or locally built library at their application.
The setting is a property of the whole link rather than of a single
library, so it also
governs the search paths a consuming project adds for itself. That is
worth stating,
because an application relying on transitive `DT_RPATH` resolution would
otherwise
find the behaviour changed with no explanation and nothing to do about
it.
Document both halves and give the opt-out for an application that needs
the older tag.
Verified by building the documented snippet against an installed wheel:
with the
interface library listed after the runtime the program carries
`DT_RPATH`, and without
it the same program carries `DT_RUNPATH`.1 parent 9017295 commit c0260ec
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| |||
0 commit comments