aboutsummaryrefslogtreecommitdiff
path: root/gcc/tests/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tests/test.rs')
-rw-r--r--gcc/tests/test.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/tests/test.rs b/gcc/tests/test.rs
index 1c51e09..8fda3ed 100644
--- a/gcc/tests/test.rs
+++ b/gcc/tests/test.rs
@@ -180,7 +180,8 @@ fn msvc_smoke() {
.must_have("/O2")
.must_have("foo.c")
.must_not_have("/Z7")
- .must_have("/c");
+ .must_have("/c")
+ .must_have("/MD");
test.cmd(1).must_have(test.td.path().join("foo.o"));
}
@@ -227,3 +228,25 @@ fn msvc_define() {
test.cmd(0).must_have("/DFOO=bar").must_have("/DBAR");
}
+
+#[test]
+fn msvc_static_crt() {
+ let test = Test::msvc();
+ test.gcc()
+ .static_crt(true)
+ .file("foo.c")
+ .compile("libfoo.a");
+
+ test.cmd(0).must_have("/MT");
+}
+
+#[test]
+fn msvc_no_static_crt() {
+ let test = Test::msvc();
+ test.gcc()
+ .static_crt(false)
+ .file("foo.c")
+ .compile("libfoo.a");
+
+ test.cmd(0).must_have("/MD");
+}