Commit 2c8d2f6
Contrib docs: note how to run a binary directly
Because it took me a moment to figure this out when I was wanting to run
`rustfmt` through a debugger.
For references of the variable to set to modify behaviour see
Windows[1], glibc[2], MacOS[3]
Note the examples use Bash parameter expansion, specifically the form
`${parameter:+word}`[4], to avoid potentially adding an empty element to
`LD_LIBRARY_PATH` that could be a security issue (see[5])
Some history: there used to be a note in `README.md` about setting this
variable, but that was removed with
2e75f23. However, with the addition of
`rustc_driver` with d7fa2ee (original
upstream[6]) this is required again.
Link: https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order [1]
Link: https://www.man7.org/linux/man-pages/man3/dlopen.3.html [2]
Link: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dlopen.3.html [3]
Link: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html [4]
Link: #2923 [5]
Link: rust-lang/rust@8c000a6 [6]1 parent 1e6ce1d commit 2c8d2f6
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
119 | 159 | | |
120 | 160 | | |
121 | 161 | | |
| |||
0 commit comments