diff --git a/Cargo.toml b/Cargo.toml index 943de2b..4aaa8d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gcc" -version = "0.3.33" +version = "0.3.34" authors = ["Alex Crichton "] license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/gcc-rs" diff --git a/src/lib.rs b/src/lib.rs index 600fa74..ea2cc9b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -337,6 +337,7 @@ impl Config { } else { obj }; + fs::create_dir_all(&obj.parent().unwrap()).unwrap(); src_dst.push((file.to_path_buf(), obj.clone())); objects.push(obj); } @@ -393,7 +394,6 @@ impl Config { (cmd, compiler.path.file_name().unwrap() .to_string_lossy().into_owned()) }; - fs::create_dir_all(&dst.parent().unwrap()).unwrap(); if msvc && is_asm { cmd.arg("/Fo").arg(dst); } else if msvc {