Skip to content

Commit 9203ca0

Browse files
authored
Unbreak macOS (#102)
macOS ar expects to build non-empty archives.
1 parent be60f97 commit 9203ca0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ fn build_cpp(files: Vec<String>, language: &str) {
128128
fn build_dir(dir: &str, language: &str) {
129129
eprintln!("Build language {}", language);
130130
let (c, cpp) = collect_src_files(&dir);
131-
build_c(c, &language);
132-
build_cpp(cpp, &language);
131+
if !c.is_empty() {
132+
build_c(c, &language);
133+
}
134+
if !cpp.is_empty() {
135+
build_cpp(cpp, &language);
136+
}
133137
}
134138

135139
fn main() {

0 commit comments

Comments
 (0)