Commit 8c0c66d
Add per-target LIBBPF_SYS_LIBRARY_PATH environment variable to help cross-compilation environments
This solves an issue when cross-compiling an application that uses libbpf-sys in build.rs(Usually via libbpf-cargo).
In that case, the libbpf-sys crate is built twice - once for the host triplet (let's say x86_64-unknown-linux-gnu, when compiling build.rs) and once for the target triplet (let's say aarch64-linux-android, when compiling the actual application).
If we set `LIBBPF_SYS_LIBRARY_PATH` to a path that contains the libelf for the target triplet, then `build.rs` will link to the incorrect library, failing the build.1 parent dabd0a5 commit 8c0c66d
2 files changed
+25
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
211 | 230 | | |
212 | 231 | | |
213 | 232 | | |
| |||
0 commit comments