about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-02 11:27:20 -0700
committerbors <bors@rust-lang.org>2016-05-02 11:27:20 -0700
commit9a003b0ef22090e8be5b2705a427d6b08b06eaf9 (patch)
tree5360ac3259a1b9b30ed2d78ac560ee166b76092d /src/test
parentd80497e628945c3f11ff351030b4c62a8533e01e (diff)
parent16eaecbe43bc135b5b69cd114c25deb14a09c9e4 (diff)
downloadrust-9a003b0ef22090e8be5b2705a427d6b08b06eaf9.tar.gz
rust-9a003b0ef22090e8be5b2705a427d6b08b06eaf9.zip
Auto merge of #32386 - brandonedens:llvm_min_size, r=alexcrichton
Add CodeGen options to optimize for size.

Add CodeGen options to annotate functions with the attributes OptimizeSize and/or MinSize used by LLVM to reduce .text size.
Closes #32296
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-make/debug-assertions/Makefile4
-rw-r--r--src/test/run-make/emit/Makefile6
2 files changed, 10 insertions, 0 deletions
diff --git a/src/test/run-make/debug-assertions/Makefile b/src/test/run-make/debug-assertions/Makefile
index 71297562768..76ada90f1e2 100644
--- a/src/test/run-make/debug-assertions/Makefile
+++ b/src/test/run-make/debug-assertions/Makefile
@@ -11,6 +11,10 @@ all:
 	$(call RUN,debug) good
 	$(RUSTC) debug.rs -C opt-level=3
 	$(call RUN,debug) good
+	$(RUSTC) debug.rs -C opt-level=s
+	$(call RUN,debug) good
+	$(RUSTC) debug.rs -C opt-level=z
+	$(call RUN,debug) good
 	$(RUSTC) debug.rs -O
 	$(call RUN,debug) good
 	$(RUSTC) debug.rs
diff --git a/src/test/run-make/emit/Makefile b/src/test/run-make/emit/Makefile
index be34028fe1d..e0b57107e5b 100644
--- a/src/test/run-make/emit/Makefile
+++ b/src/test/run-make/emit/Makefile
@@ -5,6 +5,8 @@ all:
 	$(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
 	$(RUSTC) -Copt-level=2 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
 	$(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
+	$(RUSTC) -Copt-level=s --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
+	$(RUSTC) -Copt-level=z --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
 	$(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
 	$(call RUN,test-26235) || exit 1
 	$(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
@@ -13,3 +15,7 @@ all:
 	$(call RUN,test-26235) || exit 1
 	$(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
 	$(call RUN,test-26235) || exit 1
+	$(RUSTC) -Copt-level=s --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
+	$(call RUN,test-26235) || exit 1
+	$(RUSTC) -Copt-level=z --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
+	$(call RUN,test-26235) || exit 1