Skip to content

Commit 12b3bca

Browse files
bors[bot]choco
andauthored
Merge #334
334: rs-libc: resolve symlinks in build script r=jethrogb a=choco Hello, for our build system we use `nix` specifically `naersk` (https://github.com/nmattia/naersk). During the building process dependencies are linked into a build dir, not copied. The `rs-libc` build script explicitly checks that the dir entries are files, so symlinks get ignored. One possible solutions for our use case would be to remove this check. Co-authored-by: Enrico Ghirardi <[email protected]>
2 parents 3060fd2 + c9d292e commit 12b3bca

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

rs-libc/build.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ fn main() {
2121

2222
let extension_filter = |ext| {
2323
move |f: Result<DirEntry, _>| {
24-
let f = f.unwrap();
25-
if f.file_type().unwrap().is_file() {
26-
let path = f.path();
27-
if path.extension().and_then(OsStr::to_str) == Some(ext) {
28-
return Some(path);
29-
}
24+
let path = f.unwrap().path();
25+
if path.is_file() && path.extension().and_then(OsStr::to_str) == Some(ext) {
26+
return Some(path);
3027
}
3128
None
3229
}

0 commit comments

Comments
 (0)