Skip to content

Commit cc63bb0

Browse files
authored
Add static_crt option to cpp_build::Config (#114)
- option is directly passed to cc and thus behaves exactly as it does in the cc crate
1 parent 45f7b74 commit cc63bb0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cpp_build/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,15 @@ impl Config {
601601
self
602602
}
603603

604+
/// Configures whether the /MT flag or the /MD flag will be passed to msvc
605+
/// build tools.
606+
///
607+
/// This option defaults to `false`, and affect only msvc targets.
608+
pub fn static_crt(&mut self, static_crt: bool) -> &mut Config {
609+
self.cc.static_crt(static_crt);
610+
self
611+
}
612+
604613
/// Extracts `cpp` declarations from the passed-in crate root, and builds
605614
/// the associated static library to be linked in to the final binary.
606615
///

0 commit comments

Comments
 (0)