]> git.lizzy.rs Git - rust.git/commitdiff
regression test for issue #30063
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 4 Dec 2015 18:38:00 +0000 (19:38 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Tue, 8 Dec 2015 04:39:00 +0000 (05:39 +0100)
src/test/run-make/issue-30063/Makefile [new file with mode: 0644]
src/test/run-make/issue-30063/foo.rs [new file with mode: 0644]

diff --git a/src/test/run-make/issue-30063/Makefile b/src/test/run-make/issue-30063/Makefile
new file mode 100644 (file)
index 0000000..a76051d
--- /dev/null
@@ -0,0 +1,35 @@
+-include ../tools.mk
+
+all:
+       rm -f $(TMPDIR)/foo-output
+       $(RUSTC) -C codegen-units=4 -o $(TMPDIR)/foo-output foo.rs
+       rm $(TMPDIR)/foo-output
+
+       rm -f $(TMPDIR)/asm-output
+       $(RUSTC) -C codegen-units=4 --emit=asm -o $(TMPDIR)/asm-output foo.rs
+       rm $(TMPDIR)/asm-output
+
+       rm -f $(TMPDIR)/bc-output
+       $(RUSTC) -C codegen-units=4 --emit=llvm-bc -o $(TMPDIR)/bc-output foo.rs
+       rm $(TMPDIR)/bc-output
+
+       rm -f $(TMPDIR)/ir-output
+       $(RUSTC) -C codegen-units=4 --emit=llvm-ir -o $(TMPDIR)/ir-output foo.rs
+       rm $(TMPDIR)/ir-output
+
+       rm -f $(TMPDIR)/link-output
+       $(RUSTC) -C codegen-units=4 --emit=link -o $(TMPDIR)/link-output foo.rs
+       rm $(TMPDIR)/link-output
+
+       rm -f $(TMPDIR)/obj-output
+       $(RUSTC) -C codegen-units=4 --emit=obj -o $(TMPDIR)/obj-output foo.rs
+       rm $(TMPDIR)/obj-output
+
+       rm -f $(TMPDIR)/dep-output
+       $(RUSTC) -C codegen-units=4 --emit=dep-info -o $(TMPDIR)/dep-output foo.rs
+       rm $(TMPDIR)/dep-output
+
+#      # (This case doesn't work yet, and may be fundamentally wrong-headed anyway.)
+#      rm -f $(TMPDIR)/multi-output
+#      $(RUSTC) -C codegen-units=4 --emit=asm,obj -o $(TMPDIR)/multi-output foo.rs
+#      rm $(TMPDIR)/multi-output
diff --git a/src/test/run-make/issue-30063/foo.rs b/src/test/run-make/issue-30063/foo.rs
new file mode 100644 (file)
index 0000000..45f7a2c
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() { }