Skip to content

Commit aa51b25

Browse files
committed
Update LIBBPF_SYS_LIBRARY_PATH_<TARGET> in documentation to LIBBPF_SYS_LIBRARY_PATH_<TARGET_TRIPLE> to help clarify the intended usage.
Update paths in `LIBBPF_SYS_LIBRARY_PATH_<TARGET_TRIPLE>` to take precedence over ones in `LIBBPF_SYS_LIBRARY_PATH`
1 parent 1247159 commit aa51b25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $ cargo build
4141

4242
- `LIBBPF_SYS_EXTRA_CFLAGS` can be used to pass extra cflags when vendoring libbpf, libz or libelf.
4343
- `LIBBPF_SYS_LIBRARY_PATH`: colon separated paths for the linker to find native libs.
44-
- `LIBBPF_SYS_LIBRARY_PATH_<TARGET>`: similar to `LIBBPF_SYS_LIBRARY_PATH`, but used to set per-target library path, to help cross-compilation environments. If `LIBBPF_SYS_LIBRARY_PATH_<TARGET>` and `LIBBPF_SYS_LIBRARY_PATH` are defined, the paths from both will be used.
44+
- `LIBBPF_SYS_LIBRARY_PATH_<TARGET_TRIPLE>`: similar to `LIBBPF_SYS_LIBRARY_PATH`, but used to set per-target library path, to help cross-compilation environments. If `LIBBPF_SYS_LIBRARY_PATH_<TARGET_TRIPLE>` and `LIBBPF_SYS_LIBRARY_PATH` are defined, the paths from both will be used, and the "target" paths will have precedence.
4545

4646
### Distribution
4747

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ fn main() {
216216
println!("cargo:rerun-if-env-changed={}", target_lib_path_underscored);
217217

218218
let lib_paths = vec![
219-
env::var(global_lib_path),
220219
env::var(target_lib_path),
221220
env::var(target_lib_path_underscored),
221+
env::var(global_lib_path),
222222
];
223223

224224
for lib_path in lib_paths {
@@ -246,7 +246,7 @@ fn open_lockable(path: &Path) -> io::Result<File> {
246246
// with write permissions. So just open for reading and hope
247247
// for the best.
248248
File::open(path)
249-
},
249+
}
250250
e @ Err(..) => e,
251251
}
252252
}

0 commit comments

Comments
 (0)