about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-20 10:57:10 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-20 11:16:26 -0800
commit953f294ea30253bb5578e3c895d17fcc97c20dce (patch)
treecc42fa7039e21d01ef1dd036a12626526675e510 /src/test
parentffd8cb79a2d3da6629c8f54ef9ea9c29bd92fc9e (diff)
downloadrust-953f294ea30253bb5578e3c895d17fcc97c20dce.tar.gz
rust-953f294ea30253bb5578e3c895d17fcc97c20dce.zip
rustc: Remove deprecated flags
This commit removes a number of deprecated flags from the compiler:

* opt-level => -C opt-level
* debuginfo => -C debuginfo
* print-crate-name => --print crate-name
* print-file-name => --print file-names
* no-trans => -Z no-trans
* no-analysis => -Z no-analysis
* parse-only => -Z parse-only
* dep-info => --emit dep-info

This commit also moves the --pretty flag behind `-Z unstable-options` as the
pretty printer will likely not be stable for 1.0

cc #19051
Diffstat (limited to 'src/test')
-rw-r--r--src/test/debuginfo/issue7712.rs2
-rw-r--r--src/test/debuginfo/lexical-scope-in-parameterless-closure.rs2
-rw-r--r--src/test/debuginfo/limited-debuginfo.rs2
-rw-r--r--src/test/run-make/crate-data-smoke/Makefile12
-rw-r--r--src/test/run-make/dep-info-custom/Makefile25
-rw-r--r--src/test/run-make/dep-info-custom/Makefile.foo7
-rw-r--r--src/test/run-make/dep-info-custom/bar.rs11
-rw-r--r--src/test/run-make/dep-info-custom/foo.rs11
-rw-r--r--src/test/run-make/dep-info-custom/lib.rs14
-rw-r--r--src/test/run-make/dep-info-spaces/Makefile2
-rw-r--r--src/test/run-make/dep-info-spaces/Makefile.foo6
-rw-r--r--src/test/run-make/dep-info/Makefile2
-rw-r--r--src/test/run-make/error-writing-dependencies/Makefile4
-rw-r--r--src/test/run-make/graphviz-flowgraph/Makefile2
-rw-r--r--src/test/run-make/pretty-expanded-hygiene/Makefile3
-rw-r--r--src/test/run-make/pretty-expanded/Makefile3
-rw-r--r--src/test/run-make/pretty-print-path-suffix/Makefile6
-rw-r--r--src/test/run-make/pretty-print-to-file/Makefile2
-rw-r--r--src/test/run-make/tools.mk3
19 files changed, 27 insertions, 92 deletions
diff --git a/src/test/debuginfo/issue7712.rs b/src/test/debuginfo/issue7712.rs
index 94458a7fb4b..124cdfb436c 100644
--- a/src/test/debuginfo/issue7712.rs
+++ b/src/test/debuginfo/issue7712.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags:--debuginfo=1
+// compile-flags:-C debuginfo=1
 // min-lldb-version: 310
 
 pub trait TraitWithDefaultMethod : Sized {
diff --git a/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs b/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs
index b2617c57742..0050b9273e8 100644
--- a/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs
+++ b/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs
@@ -11,7 +11,7 @@
 // ignore-android: FIXME(#10381)
 // min-lldb-version: 310
 
-// compile-flags:--debuginfo=1
+// compile-flags:-C debuginfo=1
 
 // gdb-command:run
 // lldb-command:run
diff --git a/src/test/debuginfo/limited-debuginfo.rs b/src/test/debuginfo/limited-debuginfo.rs
index 00de4497ced..76a0fd58395 100644
--- a/src/test/debuginfo/limited-debuginfo.rs
+++ b/src/test/debuginfo/limited-debuginfo.rs
@@ -12,7 +12,7 @@
 
 // ignore-lldb
 
-// compile-flags:--debuginfo=1
+// compile-flags:-C debuginfo=1
 
 // Make sure functions have proper names
 // gdb-command:info functions
diff --git a/src/test/run-make/crate-data-smoke/Makefile b/src/test/run-make/crate-data-smoke/Makefile
index 093796e1dc2..1afda457411 100644
--- a/src/test/run-make/crate-data-smoke/Makefile
+++ b/src/test/run-make/crate-data-smoke/Makefile
@@ -1,10 +1,10 @@
 -include ../tools.mk
 
 all:
-	[ `$(RUSTC) --print-crate-name crate.rs` = "foo" ]
-	[ `$(RUSTC) --print-file-name crate.rs` = "$(call BIN,foo)" ]
-	[ `$(RUSTC) --print-file-name --crate-type=lib \
+	[ `$(RUSTC) --print crate-name crate.rs` = "foo" ]
+	[ `$(RUSTC) --print file-names crate.rs` = "$(call BIN,foo)" ]
+	[ `$(RUSTC) --print file-names --crate-type=lib \
 		--test crate.rs` = "$(call BIN,foo)" ]
-	[ `$(RUSTC) --print-file-name --test lib.rs` = "$(call BIN,mylib)" ]
-	$(RUSTC) --print-file-name lib.rs
-	$(RUSTC) --print-file-name rlib.rs
+	[ `$(RUSTC) --print file-names --test lib.rs` = "$(call BIN,mylib)" ]
+	$(RUSTC) --print file-names lib.rs
+	$(RUSTC) --print file-names rlib.rs
diff --git a/src/test/run-make/dep-info-custom/Makefile b/src/test/run-make/dep-info-custom/Makefile
deleted file mode 100644
index efa6dfe981b..00000000000
--- a/src/test/run-make/dep-info-custom/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
--include ../tools.mk
-
-# FIXME: ignore freebsd/windows
-# (windows: see `../dep-info/Makefile`)
-ifneq ($(shell uname),FreeBSD)
-ifndef IS_WINDOWS
-all:
-	$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs
-	sleep 1
-	touch foo.rs
-	-rm -f $(TMPDIR)/done
-	$(MAKE) -drf Makefile.foo
-	rm $(TMPDIR)/done
-	pwd
-	$(MAKE) -drf Makefile.foo
-	rm $(TMPDIR)/done && exit 1 || exit 0
-else
-all:
-
-endif
-
-else
-all:
-
-endif
diff --git a/src/test/run-make/dep-info-custom/Makefile.foo b/src/test/run-make/dep-info-custom/Makefile.foo
deleted file mode 100644
index 88be7630e83..00000000000
--- a/src/test/run-make/dep-info-custom/Makefile.foo
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB := $(shell $(RUSTC) --print file-names --crate-type=lib lib.rs)
-
-$(TMPDIR)/$(LIB):
-	$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs
-	touch $(TMPDIR)/done
-
--include $(TMPDIR)/custom-deps-file.d
diff --git a/src/test/run-make/dep-info-custom/bar.rs b/src/test/run-make/dep-info-custom/bar.rs
deleted file mode 100644
index 4c79f7e2855..00000000000
--- a/src/test/run-make/dep-info-custom/bar.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 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.
-
-pub fn bar() {}
diff --git a/src/test/run-make/dep-info-custom/foo.rs b/src/test/run-make/dep-info-custom/foo.rs
deleted file mode 100644
index 2661b1f4eb4..00000000000
--- a/src/test/run-make/dep-info-custom/foo.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 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.
-
-pub fn foo() {}
diff --git a/src/test/run-make/dep-info-custom/lib.rs b/src/test/run-make/dep-info-custom/lib.rs
deleted file mode 100644
index 14baa8ca55a..00000000000
--- a/src/test/run-make/dep-info-custom/lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 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.
-
-#![crate_name="foo"]
-
-pub mod foo;
-pub mod bar;
diff --git a/src/test/run-make/dep-info-spaces/Makefile b/src/test/run-make/dep-info-spaces/Makefile
index 72dca3d3c90..eda8cb70081 100644
--- a/src/test/run-make/dep-info-spaces/Makefile
+++ b/src/test/run-make/dep-info-spaces/Makefile
@@ -5,7 +5,7 @@
 ifneq ($(shell uname),FreeBSD)
 ifndef IS_WINDOWS
 all:
-	$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs
+	$(RUSTC) --emit link,dep-info --crate-type=lib lib.rs
 	sleep 1
 	touch 'foo foo.rs'
 	-rm -f $(TMPDIR)/done
diff --git a/src/test/run-make/dep-info-spaces/Makefile.foo b/src/test/run-make/dep-info-spaces/Makefile.foo
index 0e187565d6d..2f4cc486d86 100644
--- a/src/test/run-make/dep-info-spaces/Makefile.foo
+++ b/src/test/run-make/dep-info-spaces/Makefile.foo
@@ -1,7 +1,7 @@
-LIB := $(shell $(RUSTC) --print-file-name --crate-type=lib lib.rs)
+LIB := $(shell $(RUSTC) --print file-names --crate-type=lib lib.rs)
 
 $(TMPDIR)/$(LIB):
-	$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs
+	$(RUSTC) --emit link,dep-info --crate-type=lib lib.rs
 	touch $(TMPDIR)/done
 
--include $(TMPDIR)/custom-deps-file.d
+-include $(TMPDIR)/lib.d
diff --git a/src/test/run-make/dep-info/Makefile b/src/test/run-make/dep-info/Makefile
index 6835ef34b0b..a1828cd1f5d 100644
--- a/src/test/run-make/dep-info/Makefile
+++ b/src/test/run-make/dep-info/Makefile
@@ -7,7 +7,7 @@
 ifneq ($(shell uname),FreeBSD)
 ifndef IS_WINDOWS
 all:
-	$(RUSTC) --dep-info --crate-type=lib lib.rs
+	$(RUSTC) --emit dep-info,link --crate-type=lib lib.rs
 	sleep 2
 	touch foo.rs
 	-rm -f $(TMPDIR)/done
diff --git a/src/test/run-make/error-writing-dependencies/Makefile b/src/test/run-make/error-writing-dependencies/Makefile
index 9f91618bda4..89fbfa0a1bf 100644
--- a/src/test/run-make/error-writing-dependencies/Makefile
+++ b/src/test/run-make/error-writing-dependencies/Makefile
@@ -2,7 +2,7 @@
 
 all:
 	# Let's get a nice error message
-	$(RUSTC) foo.rs --dep-info foo/bar/baz 2>&1 | \
+	$(BARE_RUSTC) foo.rs --emit dep-info --out-dir foo/bar/baz 2>&1 | \
 		grep "error writing dependencies"
 	# Make sure the filename shows up
-	$(RUSTC) foo.rs --dep-info foo/bar/baz 2>&1 | grep "baz"
+	$(BARE_RUSTC) foo.rs --emit dep-info --out-dir foo/bar/baz 2>&1 | grep "baz"
diff --git a/src/test/run-make/graphviz-flowgraph/Makefile b/src/test/run-make/graphviz-flowgraph/Makefile
index 4ac8cb7ae1d..1533729de94 100644
--- a/src/test/run-make/graphviz-flowgraph/Makefile
+++ b/src/test/run-make/graphviz-flowgraph/Makefile
@@ -13,7 +13,7 @@ all: $(patsubst %.rs,$(TMPDIR)/%.check,$(FILES))
 RUSTC_LIB=$(RUSTC) --crate-type=lib
 
 define FIND_LAST_BLOCK
-LASTBLOCKNUM_$(1) := $(shell $(RUSTC_LIB) --pretty=expanded,identified $(1) \
+LASTBLOCKNUM_$(1) := $(shell $(RUSTC_LIB) -Z unstable-options --pretty=expanded,identified $(1) \
 			 | grep block
 			 | tail -1
 			 | sed -e 's@.*/\* block \([0-9]*\) \*/.*@\1@')
diff --git a/src/test/run-make/pretty-expanded-hygiene/Makefile b/src/test/run-make/pretty-expanded-hygiene/Makefile
index 11763446437..136d7643ade 100644
--- a/src/test/run-make/pretty-expanded-hygiene/Makefile
+++ b/src/test/run-make/pretty-expanded-hygiene/Makefile
@@ -3,7 +3,8 @@
 REPLACEMENT := s/[0-9][0-9]*\#[0-9][0-9]*/$(shell date)/g
 
 all:
-	$(RUSTC) -o $(TMPDIR)/input.out --pretty expanded,hygiene input.rs
+	$(RUSTC) -o $(TMPDIR)/input.out -Z unstable-options \
+		--pretty expanded,hygiene input.rs
 
 	# the name/ctxt numbers are very internals-dependent and thus
 	# change relatively frequently, and testing for their exact values
diff --git a/src/test/run-make/pretty-expanded/Makefile b/src/test/run-make/pretty-expanded/Makefile
index dda441ae3d1..7a8dc8d871c 100644
--- a/src/test/run-make/pretty-expanded/Makefile
+++ b/src/test/run-make/pretty-expanded/Makefile
@@ -1,4 +1,5 @@
 -include ../tools.mk
 
 all:
-	$(RUSTC) -o $(TMPDIR)/input.expanded.rs --pretty=expanded input.rs
+	$(RUSTC) -o $(TMPDIR)/input.expanded.rs -Z unstable-options \
+		--pretty=expanded input.rs
diff --git a/src/test/run-make/pretty-print-path-suffix/Makefile b/src/test/run-make/pretty-print-path-suffix/Makefile
index f58a6527ac6..9f0c3f5120d 100644
--- a/src/test/run-make/pretty-print-path-suffix/Makefile
+++ b/src/test/run-make/pretty-print-path-suffix/Makefile
@@ -1,9 +1,9 @@
 -include ../tools.mk
 
 all:
-	$(RUSTC) -o $(TMPDIR)/foo.out --pretty normal=foo input.rs
-	$(RUSTC) -o $(TMPDIR)/nest_foo.out --pretty normal=nest::foo input.rs
-	$(RUSTC) -o $(TMPDIR)/foo_method.out --pretty normal=foo_method input.rs
+	$(RUSTC) -o $(TMPDIR)/foo.out -Z unstable-options --pretty normal=foo input.rs
+	$(RUSTC) -o $(TMPDIR)/nest_foo.out -Z unstable-options --pretty normal=nest::foo input.rs
+	$(RUSTC) -o $(TMPDIR)/foo_method.out -Z unstable-options --pretty normal=foo_method input.rs
 	diff -u $(TMPDIR)/foo.out foo.pp
 	diff -u $(TMPDIR)/nest_foo.out nest_foo.pp
 	diff -u $(TMPDIR)/foo_method.out foo_method.pp
diff --git a/src/test/run-make/pretty-print-to-file/Makefile b/src/test/run-make/pretty-print-to-file/Makefile
index 1c1242ada8a..8909dee11f0 100644
--- a/src/test/run-make/pretty-print-to-file/Makefile
+++ b/src/test/run-make/pretty-print-to-file/Makefile
@@ -1,5 +1,5 @@
 -include ../tools.mk
 
 all:
-	$(RUSTC) -o $(TMPDIR)/input.out --pretty=normal input.rs
+	$(RUSTC) -o $(TMPDIR)/input.out --pretty=normal -Z unstable-options input.rs
 	diff -u $(TMPDIR)/input.out input.pp
diff --git a/src/test/run-make/tools.mk b/src/test/run-make/tools.mk
index 971295405aa..1c791f0690c 100644
--- a/src/test/run-make/tools.mk
+++ b/src/test/run-make/tools.mk
@@ -5,7 +5,8 @@ HOST_RPATH_ENV = \
 TARGET_RPATH_ENV = \
     $(LD_LIB_PATH_ENVVAR)="$(TMPDIR):$(TARGET_RPATH_DIR):$($(LD_LIB_PATH_ENVVAR))"
 
-RUSTC := $(HOST_RPATH_ENV) $(RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR)
+BARE_RUSTC := $(HOST_RPATH_ENV) $(RUSTC)
+RUSTC := $(BARE_RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR)
 CC := $(CC) -L $(TMPDIR)
 HTMLDOCCK := $(PYTHON) $(S)/src/etc/htmldocck.py